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:
|
||||
- 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
|
||||
|
||||
|
||||
release:
|
||||
stage: release
|
||||
uberjarjar:
|
||||
stage: package
|
||||
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]+)?$/
|
||||
script:
|
||||
- echo '------------ creating a release -------------'
|
||||
- echo 'Fatjar Job ID:'
|
||||
- echo $FATJAR_JOB_ID
|
||||
- echo $CI_COMMIT_TAG
|
||||
- ./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:
|
||||
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
|
||||
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:
|
||||
- echo "---------- End CI ----------"
|
||||
|
|
Loading…
Reference in a new issue