From 0633fa04fbb5cb534601e07c5c06f79c74e22d75 Mon Sep 17 00:00:00 2001 From: Kevin Tumma Date: Tue, 8 Aug 2023 13:00:40 +0200 Subject: [PATCH] Update file .gitlab-ci.yml --- .gitlab-ci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a683836..e9d62b3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,21 @@ include: - project: 'gitlab/gitlab' ref: 'main' - file: 'ci-templates/gradle_java.yml' \ No newline at end of file + file: 'ci-templates/gradle_java.yml' + +deploy: + stage: deploy + tags: + - dind + script: + - echo "Building with gradle version ${BUILDVERSION}" + - gradle -Pversion=${BUILDVERSION} publish + - gradle bootBuildImage --cleanCache --publishImage -PbuildbootDockerHostNetwork=true -Pversion=${BUILDVERSION} + - echo "BUILDVERSION=$BUILDVERSION" >> version.env + artifacts: + reports: + dotenv: version.env + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_COMMIT_BRANCH =~ /^release/ + - if: $CI_COMMIT_TAG \ No newline at end of file