From fa4de9b5bb6dceb513f55619ee41890db664c656 Mon Sep 17 00:00:00 2001 From: saibotk Date: Fri, 5 Mar 2021 13:59:26 +0100 Subject: [PATCH] CI: Use release cli to be able to access env vars --- .gitlab-ci.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ef11bee..72e2216 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,15 +24,14 @@ release-branch: variables: GIT_STRATEGY: clone GIT_DEPTH: 0 - script: + before_script: - apk add --no-cache git - export INFRA_RELEASE_VERSION="$(date +%y.%m)" - export INFRA_RELEASE_NAME="Infrastructure $INFRA_RELEASE_VERSION" - export INFRA_RELEASE_DESCRIPTION="$(printf '## Changelog\n\n' && git log --no-merges --pretty="- %s (%h)" "HEAD...$(git tag | sort -V -r | head -1)" && printf '\n\n## External Contributors\n\n' && git log --pretty="- %an%n- %cn" HEAD...$(git tag | sort -V -r | head -1) | sort | uniq | grep -v 'saibotk' && printf "\n\n---\n*This is an automated release. See [#${CI_JOB_ID}]($CI_JOB_URL) for details.*")" - release: - name: '$INFRA_RELEASE_NAME' - tag_name: 'v${INFRA_RELEASE_VERSION}' - ref: '$CI_COMMIT_SHA' - description: '$INFRA_RELEASE_DESCRIPTION' + script: + - > + release-cli create --name "$INFRA_RELEASE_NAME" --description "$INFRA_RELEASE_DESCRIPTION" + --tag-name "v${INFRA_RELEASE_VERSION}" --ref $CI_COMMIT_SHA rules: - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $INFRA_RELEASE_NOW == "true" && $CI_COMMIT_TAG == null'