fix version tags

This commit is contained in:
yrzr 2020-07-22 22:56:00 +08:00
parent 6f33ea771c
commit 359cc88869

View File

@ -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