diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c6febd1a9ce088ef06e565cc5a9af10128349073..0a6a27901510dc4f8d761176d43e7b740ab0cc79 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -104,10 +104,10 @@ buildDebian: - triggers - branches - tags -# artifacts: -# paths: -# - ./*.$DEBIAN_PACKAGE_EXTENSION -# expire_in: 1 hour + #artifacts: + # paths: + # - ./*.$DEBIAN_PACKAGE_EXTENSION + # expire_in: 1 hour deployDebian: stage: deployDebian @@ -128,7 +128,7 @@ deployDebian: --id-length 8 --ignore-branch --git-log="--merges --grep=into[[:space:]]'master'" - # -uc do not sign .changes file, -us do not sign source package (see dpkg-buildpackage) + #-uc do not sign .changes file, -us do not sign source package (see dpkg-buildpackage) # -i -I exclude .git directory (see dpkg-source) - > gbp buildpackage diff --git a/debian/install b/debian/install index 822420bfa0aaa0dc0a9cc3bb1b04ed048072e9f8..4006b763a27d3aa5ed87d054a2f127db022f578b 100644 --- a/debian/install +++ b/debian/install @@ -1,11 +1,6 @@ -pom.xml /opt/kypo2/kypo2-user-and-group -kypo2-api-user-and-group /opt/kypo2/kypo2-user-and-group kypo2-api-user-and-group/target/kypo2-api-user-and-group*.jar /opt/kypo2/kypo2-user-and-group/jars -kypo2-persistence-user-and-group /opt/kypo2/kypo2-user-and-group kypo2-persistence-user-and-group/target/kypo2-persistence-user-and-group*.jar /opt/kypo2/kypo2-user-and-group/jars -kypo2-rest-user-and-group /opt/kypo2/kypo2-user-and-group kypo2-rest-user-and-group/target/kypo2-rest-user-and-group*.jar /opt/kypo2/kypo2-user-and-group/jars -kypo2-security-user-and-group /opt/kypo2/kypo2-user-and-group kypo2-security-user-and-group/target/kypo2-security-user-and-group*.jar /opt/kypo2/kypo2-user-and-group/jars -kypo2-service-user-and-group /opt/kypo2/kypo2-user-and-group kypo2-service-user-and-group/target/kypo2-service-user-and-group*.jar /opt/kypo2/kypo2-user-and-group/jars +kypo2-persistence-user-and-group/src/main/resources/db/migration/*.sql /opt/kypo2/kypo2-user-and-group/migration diff --git a/debian/postinst b/debian/postinst index ab22a81a784c5f5bf3fb5f31d49780850b91fe53..c0cb06f0929febd5c9c99005c60a3ee45f95d6aa 100644 --- a/debian/postinst +++ b/debian/postinst @@ -2,8 +2,7 @@ set -e case "$1" in configure) - cd /opt/kypo2/kypo2-user-and-group - mvn clean install + cd /opt/kypo2/kypo2-user-and-group/jars API_JAR=$(ls kypo2-api-user-and-group*.jar | tail -n 1) if ! [ "$API_JAR" = "kypo2-api-user-and-group.jar" ]; then ln -sf $API_JAR kypo2-api-user-and-group.jar; fi @@ -17,6 +16,8 @@ case "$1" in if ! [ "$SERVICE_JAR" = "kypo2-service-user-and-group.jar" ]; then ln -sf $SERVICE_JAR kypo2-service-user-and-group.jar; fi ;; + mvn install:install-file -Dfile=kypo2-api-user-and-group.jar -Dfile=kypo2-persistence-user-and-group.jar -Dfile=kypo2-rest-user-and-group.jar -Dfile=kypo2-security-user-and-group.jar -Dfile=kypo2-service-user-and-group.jar + abort-upgrade|abort-remove|abort-deconfigure) ;; diff --git a/debian/service b/debian/service index c64c8c0a3d2461b2b259f7c28b79c86c84812978..dc1106386c0d54fd5c0ccd5db893f2545d9345d2 100644 --- a/debian/service +++ b/debian/service @@ -6,7 +6,7 @@ User=kypo ExecStart=/usr/bin/java -Dpath.to.config.file=/etc/kypo2/java-projects/properties/user-and-group/user-and-group-project.properties -jar /opt/kypo2/kypo2-user-and-group/jars/kypo2-rest-user-and-group.jar StandardOutput=syslog StandardError=syslog -SyslogIdentifier=/var/log/syslog +SyslogIdentifier=kypo2-user-and-group Restart=always [Install]