From 359cc88869c3da3e88a971403a42195959aef9d3 Mon Sep 17 00:00:00 2001 From: yrzr Date: Wed, 22 Jul 2020 22:56:00 +0800 Subject: [PATCH] fix version tags --- .gitlab-ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c84af43..8e365de 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,7 +20,7 @@ check: - git fetch --tags # check version - if [ -f ./version_list ]; then rm version_list; fi - - curl -s "https://pkg.yrzr.ocry.com" | grep "gitlab-ce_" | sed 's/.*gitlab-ce_\(.*\)_arm64.*/\1/' | sort -rV >> version_list + - curl -s "https://pkg.yrzr.ocry.com" | grep "gitlab-ce_" | sed 's/.*gitlab-ce_\(.*\)-ce.*/\1/' | sort -rV >> version_list # create tags - ./create-tags.sh - git push --tags https://${GITLAB_USER_LOGIN}:${PERSONAL_ACCESS_TOKEN}@git.yrzr.ocry.com/docker/gitlab-ce-arm64.git @@ -40,18 +40,19 @@ build: - docker info script: - apk add --no-cache --upgrade bash coreutils - - REMOTE_VERSION=$(sed "s/-/+/" <<< ${CI_COMMIT_TAG}) && echo ${REMOTE_VERSION} + - RELEASE_VERSION="${CI_COMMIT_TAG}-ce.0" && echo ${RELEASE_VERSION} + - REMOTE_VERSION="${CI_COMMIT_TAG}+ce.0" && echo ${REMOTE_VERSION} # fetch dockerfile - git clone -b ${REMOTE_VERSION} --depth=1 https://gitlab.com/gitlab-org/omnibus-gitlab.git - cd ./omnibus-gitlab/docker # write RELEASE - echo "PACKAGECLOUD_REPO=gitlab-ce" > RELEASE - echo "RELEASE_PACKAGE=gitlab-ce" >> RELEASE - - echo "RELEASE_VERSION=${CI_COMMIT_TAG}" >> RELEASE - - echo "DOWNLOAD_URL=https://${PKG_SERVER_URL}/gitlab-ce_${CI_COMMIT_TAG}_arm64.deb" >> RELEASE + - echo "RELEASE_VERSION=${RELEASE_VERSION}" >> RELEASE + - echo "DOWNLOAD_URL=https://${PKG_SERVER_URL}/gitlab-ce_${CI_COMMIT_TAG}-ce.0_arm64.deb" >> RELEASE # missing package libatomic1 after version 13 - sed -i 's/less/less libatomic1/' ./Dockerfile - - docker build -q -t ${DOCKER_NS}/${BASENAME}:${CI_COMMIT_TAG} -f ./Dockerfile ./ + - docker build -q -t ${DOCKER_NS}/${BASENAME}:${CI_COMMIT_TAG}-ce.0 -f ./Dockerfile ./ # latest tag - cd ../../ && git fetch --tags && ./latest-tag.sh # docker push