diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01bdd6b9..f6ebe486 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,6 @@ variables: LIB_NAME: "eaaf-components" MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true --settings ${CI_PROJECT_DIR}/.cisettings.xml" MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=${CI_PROJECT_DIR}/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true" - DEPLOY_EGIZ: "apps.egiz.gv.at ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFyPUwab/Ipmc9NxI+c2i0fzLcIilh3uNebUyUYKFm04bW+aGHuwtsmAka5T3amQA0ADVMTGPWk1JGW0D0dgvXVcU8yYKYw61imKHBiPIdRNh9zVV/p5iL6bCK3AZ0UoZFfeIRNWNfKA6XGJ5e9i2DD1H8BllFOsWeUUYA8GA4tN2j8vL/dZnMcYmbisaUPuCjd7TGnbp+CcRO/f9w87qU/vp2fTG+sNBApuSR18BinUerSK9YK5qLgHxmVeIDtALq1JD5OGacvnTfAczfwSOf37+jtRzpMicGQOBQztoqfifPDAKrr6tYPrQ/pS4PKM/MnhYlvSwQa5h046REFXrx" GIT_SUBMODULE_STRATEGY: recursive GIT_DEPTH: "2" SECURE_LOG_LEVEL: "debug" @@ -23,12 +22,12 @@ dependency_scanning: variables: MAVEN_CLI_OPTS: "-DskipTests --settings ${CI_PROJECT_DIR}/.cisettings.xml" DS_JAVA_VERSION: 17 - + spotbugs-sast: variables: - MAVEN_CLI_OPTS: "-DskipTests --settings ${CI_PROJECT_DIR}/.cisettings.xml" - SAST_JAVA_VERSION: 17 - + MAVEN_CLI_OPTS: "-DskipTests --settings ${CI_PROJECT_DIR}/.cisettings.xml" + SAST_JAVA_VERSION: 17 + default: tags: - docker @@ -42,7 +41,7 @@ stages: cache: paths: - ".m2/repository" - + assemble: stage: assemble except: @@ -58,7 +57,7 @@ assemble: paths: - build_reporting/target/site/jacoco-aggregate-ut/jacoco.xml - build_reporting/target/site/jacoco-aggregate-ut/jacoco.csv - + coverage: stage: test image: haynes/jacoco2cobertura:1.0.4 @@ -71,7 +70,7 @@ coverage: # read the <source></source> tag and prepend the path to every filename attribute #- 'python /opt/source2filename.py target/site/cobertura.xml' - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, " instructions covered"; print 100*covered/instructions, "% covered" }' $JACOCO_CSV_LOCATION - needs: + needs: - job: assemble dependencies: - assemble @@ -80,7 +79,7 @@ coverage: coverage_report: coverage_format: cobertura path: target/site/cobertura.xml - + publishToGitlab: stage: package tags: @@ -92,11 +91,11 @@ publishToGitlab: - mkdir -p ~/.ssh #- ssh-keyscan apps.egiz.gv.at >> ~/.ssh/known_hosts - echo $DEPLOY_EGIZ >> ~/.ssh/known_hosts - - chmod 644 ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts script: | export VERSION=$(mvn -B help:evaluate -Dexpression=project.version -B | grep -v "\[INFO\]" | grep -Po "\d+\.\d+\.\d+((-\w*)+)?") echo "Publishing version $VERSION for $LIB_NAME to public EGIZ maven" - mvn $MAVEN_CLI_OPTS deploy -s .cisettings.xml -P jenkinsDeploy -DskipTests + mvn $MAVEN_CLI_OPTS deploy -s .cisettings.xml -P jenkinsDeploy -DskipTests echo "VERSION=$VERSION" >> variables.env artifacts: when: always |