cleanup ci
This commit is contained in:
parent
3f1fdb754e
commit
616c99d822
1 changed files with 42 additions and 30 deletions
|
@ -3,8 +3,8 @@ image: openjdk:11-jdk-slim
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
|
- package
|
||||||
- publish
|
- publish
|
||||||
- fatjar
|
|
||||||
- release
|
- release
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
|
@ -71,8 +71,8 @@ publish:
|
||||||
expire_in: 2 months
|
expire_in: 2 months
|
||||||
|
|
||||||
|
|
||||||
fatjars:
|
.fatjars:
|
||||||
stage: fatjar
|
stage: package
|
||||||
rules:
|
rules:
|
||||||
# Do no allow manually triggered pipelines to prevent duplicates!
|
# Do no allow manually triggered pipelines to prevent duplicates!
|
||||||
# Instead rerun the pipeline created with the last push
|
# Instead rerun the pipeline created with the last push
|
||||||
|
@ -98,37 +98,49 @@ fatjars:
|
||||||
dotenv: generate_executables.env
|
dotenv: generate_executables.env
|
||||||
expire_in: 6 months
|
expire_in: 6 months
|
||||||
|
|
||||||
|
uberjarjar:
|
||||||
release:
|
stage: package
|
||||||
stage: release
|
|
||||||
rules:
|
rules:
|
||||||
# Do no allow manually triggered pipelines to prevent duplicates!
|
|
||||||
# Instead rerun the pipeline created with the last push
|
|
||||||
- if: $CI_PIPELINE_SOURCE != "push"
|
- if: $CI_PIPELINE_SOURCE != "push"
|
||||||
when: never
|
when: never
|
||||||
# Only execute when a valid version tag like v1.0, 2.3 or similar is given
|
- if: $CI_COMMIT_TAG =~ /^release-[0-9]+[.][0-9]+([.][0-9]+)?$/
|
||||||
# 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
|
|
||||||
script:
|
script:
|
||||||
- echo '------------ creating a release -------------'
|
- ./gradlew uberjarServer
|
||||||
- echo 'Fatjar Job ID:'
|
- ./gradlew uberjarDesktop
|
||||||
- echo $FATJAR_JOB_ID
|
- cd build/libs/
|
||||||
- echo $CI_COMMIT_TAG
|
- find . -type f -exec sha256sum {} \; | sort > sha256sum.lst
|
||||||
release:
|
- find . -type f -exec sha512sum {} \; | sort > sha512sum.lst
|
||||||
name: 'Release $CI_COMMIT_TAG'
|
artifacts:
|
||||||
description: 'Release of provs'
|
paths:
|
||||||
tag_name: '$CI_COMMIT_TAG'
|
- 'build/libs/provs-desktop.jar'
|
||||||
ref: '$CI_COMMIT_TAG'
|
- 'build/libs/provs-server.jar'
|
||||||
assets:
|
- 'build/libs/sha256sum.lst'
|
||||||
links:
|
- 'build/libs/sha512sum.lst'
|
||||||
- name: provs.jar
|
expire_in: never
|
||||||
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
|
release:
|
||||||
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||||
|
stage: release
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE != "push"
|
||||||
|
when: never
|
||||||
|
- 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:
|
||||||
|
- 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:
|
after_script:
|
||||||
- echo "---------- End CI ----------"
|
- echo "---------- End CI ----------"
|
||||||
|
|
Loading…
Reference in a new issue