mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
include gittag into yaml
This commit is contained in:
parent
618d4b2340
commit
0c50d6fe24
@ -32,6 +32,8 @@ docker:
|
|||||||
|
|
||||||
gittag:
|
gittag:
|
||||||
extends: .publish
|
extends: .publish
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"
|
||||||
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/quality:${CACHE_IMAGE_TAG}
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/quality:${CACHE_IMAGE_TAG}
|
||||||
tags: ["veloren/veloren", "publish", "trusted"]
|
tags: ["veloren/veloren", "publish", "trusted"]
|
||||||
script:
|
script:
|
||||||
@ -40,10 +42,9 @@ gittag:
|
|||||||
- git config --global http.postBuffer 52428800
|
- git config --global http.postBuffer 52428800
|
||||||
- git remote set-url origin https://veloren-bot:${GITLAB_TOKEN_WRITE}@${CI_PROJECT_URL:8}
|
- git remote set-url origin https://veloren-bot:${GITLAB_TOKEN_WRITE}@${CI_PROJECT_URL:8}
|
||||||
- |
|
- |
|
||||||
publishgittag PUBLISH_GIT_TAG
|
if [[ ! "${SCHEDULE_CADENCE}" =~ ${TAG_REGEX} ]]; then
|
||||||
if [ "${PUBLISH_GIT_TAG}" != "" ]; then
|
git tag -a "${SCHEDULE_CADENCE}" -m '' -f;
|
||||||
git tag -a "${PUBLISH_GIT_TAG}" -m '' -f;
|
git push origin "${SCHEDULE_CADENCE}" -f;
|
||||||
git push origin "${PUBLISH_GIT_TAG}" -f;
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
|
@ -27,23 +27,3 @@ if [[ ${CI_COMMIT_BRANCH} == ${CI_DEFAULT_BRANCH} ]]; then
|
|||||||
return 0;
|
return 0;
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
### returns respective GIT TAG
|
|
||||||
### release-tag => "" (releases already have a tag)
|
|
||||||
### schedule => <SCHEDULE_CADENCE> (e.g. nightly)
|
|
||||||
### master => "" (master doesn't need a tag)
|
|
||||||
### else => ""
|
|
||||||
publishgittag () {
|
|
||||||
local -n VAR=$1
|
|
||||||
if [[ -z "${SCHEDULE_CADENCE}" && ${CI_PIPELINE_SOURCE} == "schedule" ]]; then
|
|
||||||
VAR="${SCHEDULE_CADENCE}";
|
|
||||||
# sanitize check
|
|
||||||
if [[ "${SCHEDULE_CADENCE}" =~ ${TAG_REGEX} ]]; then
|
|
||||||
VAR="invalid_cadence";
|
|
||||||
else
|
|
||||||
VAR="${SCHEDULE_CADENCE}";
|
|
||||||
fi
|
|
||||||
return 0;
|
|
||||||
fi
|
|
||||||
VAR="";
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user