aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorGerald Palfinger <gerald.palfinger@iaik.tugraz.at>2022-01-20 14:20:41 +0000
committerGerald Palfinger <gerald.palfinger@iaik.tugraz.at>2022-01-20 14:20:41 +0000
commit863eef9357f985936f0e72a267232fbd42315d95 (patch)
treeb47bbb1f43d250b4a009aa5fe9b3a013ffe5a292 /.gitlab-ci.yml
parent70efc77fb1ba95a74ad8c7ce6ad097de35d208e2 (diff)
parent228b1e2dc09d9554edcd667c68325709d1fb0d3e (diff)
downloadpdf-as-4-863eef9357f985936f0e72a267232fbd42315d95.tar.gz
pdf-as-4-863eef9357f985936f0e72a267232fbd42315d95.tar.bz2
pdf-as-4-863eef9357f985936f0e72a267232fbd42315d95.zip
Merge branch 'issue_58' into 'master'
Update all vulnerable dependencies See merge request egiz/pdf-as-4!1
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml86
1 files changed, 86 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..1cd13b89
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,86 @@
+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 --warning-mode all -x test clean build
+ artifacts:
+ when: always
+ reports:
+ junit: "**/build/test-results/test/**/TEST-*.xml"
+
+release_packaging:
+ stage: package
+ tags:
+ - docker
+ except:
+ - tags
+ - /^feature/.*$/i
+ - /^issue.*$/i
+ before_script:
+ - mkdir -p ~/.ssh
+ - ssh-keyscan apps.egiz.gv.at >> ~/.ssh/known_hosts
+ - chmod 644 ~/.ssh/known_hosts
+ script: |
+ ./gradlew --stacktrace -x test 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"