add release-patch job
This commit is contained in:
parent
33a11e16ac
commit
26ee1213a9
1 changed files with 31 additions and 0 deletions
|
@ -5,6 +5,7 @@ stages:
|
||||||
- test
|
- test
|
||||||
- build
|
- build
|
||||||
- deploy
|
- deploy
|
||||||
|
- release
|
||||||
|
|
||||||
cache: &global_cache
|
cache: &global_cache
|
||||||
key:
|
key:
|
||||||
|
@ -66,3 +67,33 @@ deploy:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
resource_group: production
|
resource_group: production
|
||||||
|
|
||||||
|
release-patch:
|
||||||
|
stage: release
|
||||||
|
before_script:
|
||||||
|
- apt update
|
||||||
|
- apt install jq
|
||||||
|
variables:
|
||||||
|
RELEASE_TYPE: patch
|
||||||
|
cache:
|
||||||
|
<<: *global_cache
|
||||||
|
script: |
|
||||||
|
REPOSITORY_URL=$(echo "${CI_REPOSITORY_URL}" | sed -e "s|gitlab-ci-token:.*@|${RELEASE_TOKEN}:${RELEASE_TOKEN_SECRET}@|g")
|
||||||
|
git remote set-url origin $REPOSITORY_URL
|
||||||
|
git config user.name $GITLAB_USER_LOGIN
|
||||||
|
git config user.email $GITLAB_USER_EMAIL
|
||||||
|
git branch -D ci-processing || true
|
||||||
|
git checkout -b ci-processing
|
||||||
|
npm run updateManifest --update=${RELEASE_TYPE}
|
||||||
|
npm install
|
||||||
|
RELEASE_VERSION=$(jq -r '.version' < package.json)
|
||||||
|
git add package.json package-lock.json src/system.json
|
||||||
|
git commit -m "release version ${VERSION}"
|
||||||
|
git tag -f latest
|
||||||
|
git tag ${RELEASE_VERSION}
|
||||||
|
# git push origin ci-processing:${CI_BUILD_REF_NAME}
|
||||||
|
# git push latest -f
|
||||||
|
# git push ${RELEASE_VERSION}
|
||||||
|
# only:
|
||||||
|
# - master
|
||||||
|
when: manual
|
||||||
|
|
Loading…
Reference in a new issue