aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorAlexander Marsalek <amarsalek@iaik.tugraz.at>2021-01-18 10:57:38 +0100
committerAlexander Marsalek <amarsalek@iaik.tugraz.at>2021-01-18 12:04:52 +0100
commit9afa8f094712729b4486a408e12f4ab3027938b4 (patch)
tree3adbbf5d892452ea8b82404f28e95fdadd34ece8 /.gitlab-ci.yml
parent09751b59f7e2da247c32324826607e5f1eef0f10 (diff)
parent68e9725d024ccef7b618f462dee5648ca288bdc0 (diff)
downloadNational_eIDAS_Gateway-9afa8f094712729b4486a408e12f4ab3027938b4.tar.gz
National_eIDAS_Gateway-9afa8f094712729b4486a408e12f4ab3027938b4.tar.bz2
National_eIDAS_Gateway-9afa8f094712729b4486a408e12f4ab3027938b4.zip
Merge branch 'base' into issue6
# Conflicts: # eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java # eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SimpleEidasData.java # eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/ernp/DummyErnpClient.java # eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/ernp/IErnpClient.java # eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/handler/AbstractEidProcessor.java # eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java # eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/utils/EidasResponseUtils.java # eidas_modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml # eidas_modules/authmodule-eIDAS-v2/src/main/resources/eidas_v2_auth.beans.xml # eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/InitialSearchTaskFirstTest.java # eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_tasks_test.xml
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml55
1 files changed, 54 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5b324d5f..523230e3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: maven:3.6-jdk-8
+image: maven:latest
variables:
LC_ALL: "en_US.UTF-8"
@@ -9,6 +9,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
@@ -26,11 +29,61 @@ cache:
assemble:
stage: assemble
+ tags:
+ - docker
except:
- 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
+ coverage: '/([0-9]{1,3}.[0-9]*).%.covered/'
artifacts:
when: always
reports:
junit: "**/target/surefire-reports/TEST-*.xml"
+ paths:
+ - $JACOCO_CSV_LOCATION
+ - $JACOCO_XML_LOCATION
+
+
+buildDistributionPackage:
+ stage: package
+ tags:
+ - docker
+ except:
+ - tags
+ - /^feature/.*$/i
+ 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:
+ name: "${CI_PROJECT_NAME}-${CI_COMMIT_SHORT_SHA}"
+ when: always
+ reports:
+ dotenv: variables.env
+ paths:
+ - $PROJECT_RELEASE_PACKAGE
+
+release:
+ stage: release
+ image: registry.gitlab.com/gitlab-org/release-cli:latest
+ tags:
+ - docker
+ 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_PROJECT_NAME}-${CI_COMMIT_SHORT_SHA}-release"
+ expire_in: never
+ paths:
+ - $PROJECT_RELEASE_PACKAGE