aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2020-12-15 18:21:07 +0100
committerThomas Lenz <thomas.lenz@egiz.gv.at>2020-12-15 18:21:07 +0100
commit47e2b6c838233aec6482ae81db91d8d48f0d3ea3 (patch)
tree495db98e50d49f8170896df6a4577a8e480866d0 /.gitlab-ci.yml
parent230e6c3890c7e63b286e9a08001e5ffd63743d2c (diff)
parent76bba5972cfa6d6272a73cbdf56a8705419c55c8 (diff)
downloadNational_eIDAS_Gateway-47e2b6c838233aec6482ae81db91d8d48f0d3ea3.tar.gz
National_eIDAS_Gateway-47e2b6c838233aec6482ae81db91d8d48f0d3ea3.tar.bz2
National_eIDAS_Gateway-47e2b6c838233aec6482ae81db91d8d48f0d3ea3.zip
Merge branch 'feature/EID_connection' into 'nightlybuild'
Feature/eid connection See merge request egiz/eidas_at_proxy!2
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml47
1 files changed, 46 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 81a4a4dd..17655aa5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,5 @@
-image: maven:3.6-jdk-8
+#image: maven:3.6-jdk-8
+image: maven:latest
variables:
LC_ALL: "en_US.UTF-8"
@@ -9,6 +10,9 @@ variables:
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"
GIT_DEPTH: "2"
SECURE_LOG_LEVEL: "debug"
+ JACOCO_CSV_LOCATION: '${CI_PROJECT_DIR}/build_reporting/target/site/jacoco-aggregate-ut/jacoco.csv'
+ JACOCO_XML_LOCATION: '${CI_PROJECT_DIR}/build_reporting/target/site/jacoco-aggregate-ut/jacoco.xml'
+ PROJECT_RELEASE_PACKAGE: '${CI_PROJECT_DIR}/target/*-dist.zip'
include:
- template: Dependency-Scanning.gitlab-ci.yml
@@ -31,7 +35,48 @@ assemble:
- tags
script: |
mvn $MAVEN_CLI_OPTS generate-sources compile test
+ after_script:
+ - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, " instructions covered"; print 100*covered/instructions, "% covered" }' $JACOCO_CSV_LOCATION
artifacts:
when: always
reports:
junit: "**/target/surefire-reports/TEST-*.xml"
+ paths:
+ - $JACOCO_CSV_LOCATION
+ - $JACOCO_XML_LOCATION
+
+
+buildDistributionPackage:
+ stage: package
+ except:
+ - tags
+ script: |
+ export VERSION=$(mvn -B help:evaluate -Dexpression=project.version -B | grep -v "\[INFO\]" | grep -Po "\d+\.\d+\.\d+((-\w*)+)?")
+ echo "Build full package of version $VERSION"
+ mvn $MAVEN_CLI_OPTS verify -DskipTests
+ echo "VERSION=$VERSION" >> variables.env
+ artifacts:
+ when: always
+ reports:
+ dotenv: variables.env
+ name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
+ paths:
+ - $PROJECT_RELEASE_PACKAGE
+
+release:
+ stage: release
+ image: registry.gitlab.com/gitlab-org/release-cli:latest
+ needs:
+ - job: buildDistributionPackage
+ artifacts: true
+ when: manual
+ only:
+ - master
+ script: |
+ echo "Releasing version $VERSION of $LIB_NAME"
+ echo "Publishing version $VERSION to public EGIZ maven"
+ mvn $MAVEN_CLI_OPTS deploy
+ artifacts:
+ name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME-EGIZ"
+ paths:
+ - $PROJECT_RELEASE_PACKAGE