diff options
author | Thomas <> | 2021-12-12 12:33:31 +0100 |
---|---|---|
committer | Gerald Palfinger <gerald.palfinger@iaik.tugraz.at> | 2022-01-20 14:54:26 +0100 |
commit | 56c389b4373e10edda7f5dbc38b0d6abad3aa9ca (patch) | |
tree | e401c433c9966e4bee5c05e00a3950ba2692df6b | |
parent | 5e66df88b3a21edd0a51d1f1139e66ba93ea9df1 (diff) | |
download | pdf-as-4-56c389b4373e10edda7f5dbc38b0d6abad3aa9ca.tar.gz pdf-as-4-56c389b4373e10edda7f5dbc38b0d6abad3aa9ca.tar.bz2 pdf-as-4-56c389b4373e10edda7f5dbc38b0d6abad3aa9ca.zip |
add GitLab CI configuration
-rw-r--r-- | .gitlab-ci.yml | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..310e2051 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,84 @@ +image: gradle:6.8.3-jdk11 + +variables: + LC_ALL: "en_US.UTF-8" + LANG: "en_US.UTF-8" + LANGUAGE: "en_US" + LIB_NAME: "PDF-AS 4" + GIT_DEPTH: "2" + SECURE_LOG_LEVEL: "debug" + +include: + - template: Dependency-Scanning.gitlab-ci.yml + - template: Security/SAST.gitlab-ci.yml + - template: Secret-Detection.gitlab-ci.yml + +default: + tags: + - docker + +stages: + - assemble + - test + - package + - release + +cache: + paths: + - .m2/repository + - .gradle/wrapper + - .gradle/caches + +assemble: + stage: assemble + tags: + - docker + except: + - tags + script: | + ./gradlew clean build --warning-mode all + artifacts: + when: always + reports: + junit: "**/build/test-results/test/**/TEST-*.xml" + +release_packaging: + stage: package + tags: + - docker + except: + - tags + before_script: + - mkdir -p ~/.ssh + - ssh-keyscan apps.egiz.gv.at >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + script: | + ./gradlew assemble uploadArchives + artifacts: + when: always + name: "${CI_PROJECT_NAME}-${CI_COMMIT_SHORT_SHA}" + reports: + dotenv: variables.env + +release: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + tags: + - docker + needs: + - job: assemble + artifacts: true + when: manual + only: + - master + script: | + echo "Releasing version $VERSION of $LIB_NAME" + echo "Publishing version $VERSION to public EGIZ maven" + cd ./moaSig + ./gradlew release + artifacts: + name: "${CI_PROJECT_NAME}-${CI_COMMIT_SHORT_SHA}-release" + expire_in: never + paths: + - "../release/${VERSION}/pdf-as-web-${VERSION}.war" + - "../release/${VERSION}/pdf-as-lib-${VERSION}.zip" |