|
|
|
@ -3,8 +3,8 @@ image: openjdk:11-jdk-slim
|
|
|
|
|
stages:
|
|
|
|
|
- build
|
|
|
|
|
- test
|
|
|
|
|
- package
|
|
|
|
|
- publish
|
|
|
|
|
- fatjar
|
|
|
|
|
- release
|
|
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
@ -71,8 +71,8 @@ publish:
|
|
|
|
|
expire_in: 2 months
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fatjars:
|
|
|
|
|
stage: fatjar
|
|
|
|
|
.fatjars:
|
|
|
|
|
stage: package
|
|
|
|
|
rules:
|
|
|
|
|
# Do no allow manually triggered pipelines to prevent duplicates!
|
|
|
|
|
# Instead rerun the pipeline created with the last push
|
|
|
|
@ -98,37 +98,49 @@ fatjars:
|
|
|
|
|
dotenv: generate_executables.env
|
|
|
|
|
expire_in: 6 months
|
|
|
|
|
|
|
|
|
|
uberjarjar:
|
|
|
|
|
stage: package
|
|
|
|
|
rules:
|
|
|
|
|
- if: $CI_PIPELINE_SOURCE != "push"
|
|
|
|
|
when: never
|
|
|
|
|
- if: $CI_COMMIT_TAG =~ /^release-[0-9]+[.][0-9]+([.][0-9]+)?$/
|
|
|
|
|
script:
|
|
|
|
|
- ./gradlew uberjarServer
|
|
|
|
|
- ./gradlew uberjarDesktop
|
|
|
|
|
- cd build/libs/
|
|
|
|
|
- find . -type f -exec sha256sum {} \; | sort > sha256sum.lst
|
|
|
|
|
- find . -type f -exec sha512sum {} \; | sort > sha512sum.lst
|
|
|
|
|
artifacts:
|
|
|
|
|
paths:
|
|
|
|
|
- 'build/libs/provs-desktop.jar'
|
|
|
|
|
- 'build/libs/provs-server.jar'
|
|
|
|
|
- 'build/libs/sha256sum.lst'
|
|
|
|
|
- 'build/libs/sha512sum.lst'
|
|
|
|
|
expire_in: never
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
release:
|
|
|
|
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
|
|
|
|
stage: release
|
|
|
|
|
rules:
|
|
|
|
|
# Do no allow manually triggered pipelines to prevent duplicates!
|
|
|
|
|
# Instead rerun the pipeline created with the last push
|
|
|
|
|
- if: $CI_PIPELINE_SOURCE != "push"
|
|
|
|
|
when: never
|
|
|
|
|
# Only execute when a valid version tag like v1.0, 2.3 or similar is given
|
|
|
|
|
# Required is always one point like 1.0
|
|
|
|
|
- if: $CI_COMMIT_TAG =~ /^v[0-9]+[.][0-9]+([.][0-9]+)?$/
|
|
|
|
|
needs:
|
|
|
|
|
- job: fatjars
|
|
|
|
|
artifacts: true
|
|
|
|
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
|
|
|
|
- if: $CI_COMMIT_TAG =~ /^release-[0-9]+[.][0-9]+([.][0-9]+)?$/
|
|
|
|
|
artifacts:
|
|
|
|
|
paths:
|
|
|
|
|
- 'build/libs/provs-desktop.jar'
|
|
|
|
|
- 'build/libs/provs-server.jar'
|
|
|
|
|
- 'build/libs/sha256sum.lst'
|
|
|
|
|
- 'build/libs/sha512sum.lst'
|
|
|
|
|
script:
|
|
|
|
|
- echo '------------ creating a release -------------'
|
|
|
|
|
- echo 'Fatjar Job ID:'
|
|
|
|
|
- echo $FATJAR_JOB_ID
|
|
|
|
|
- echo $CI_COMMIT_TAG
|
|
|
|
|
release:
|
|
|
|
|
name: 'Release $CI_COMMIT_TAG'
|
|
|
|
|
description: 'Release of provs'
|
|
|
|
|
tag_name: '$CI_COMMIT_TAG'
|
|
|
|
|
ref: '$CI_COMMIT_TAG'
|
|
|
|
|
assets:
|
|
|
|
|
links:
|
|
|
|
|
- name: provs.jar
|
|
|
|
|
url: https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${FATJAR_JOB_ID}/artifacts/raw/build/libs/provs.jar
|
|
|
|
|
- name: provs-server.jar
|
|
|
|
|
url: https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${FATJAR_JOB_ID}/artifacts/raw/build/libs/provs-server.jar
|
|
|
|
|
- apk --no-cache add curl
|
|
|
|
|
- |
|
|
|
|
|
release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \
|
|
|
|
|
--assets-link "{\"name\":\"provs-desktop.jar\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${CI_JOB_ID}/artifacts/file/build/libs/provs-desktop.jar\"}" \
|
|
|
|
|
--assets-link "{\"name\":\"provs-server.jar\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${CI_JOB_ID}/artifacts/file/build/libs/provs-server.jar\"}" \
|
|
|
|
|
--assets-link "{\"name\":\"provs-desktop.jar\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${CI_JOB_ID}/artifacts/file/build/libs/provs-desktop.jar\"}" \
|
|
|
|
|
--assets-link "{\"name\":\"sha256sum.lst\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${CI_JOB_ID}/artifacts/file/build/libs/sha256sum.lst\"}" \
|
|
|
|
|
--assets-link "{\"name\":\"sha512sum.lst\",\"url\":\"https://gitlab.com/domaindrivenarchitecture/provs/-/jobs/${CI_JOB_ID}/artifacts/file/build/libs/sha512sum.lst\"}" \
|
|
|
|
|
|
|
|
|
|
after_script:
|
|
|
|
|
- echo "---------- End CI ----------"
|
|
|
|
|