mirror of
https://git.yrzr.tk/docker/gitlab-ce-arm64.git
synced 2024-11-22 13:28:12 +08:00
correct BRANCH_NAME and use debian as base image
This commit is contained in:
parent
af3fae036c
commit
b04cdbe4bd
@ -6,6 +6,7 @@ stages:
|
|||||||
- check
|
- check
|
||||||
- build
|
- build
|
||||||
|
|
||||||
|
|
||||||
check:
|
check:
|
||||||
image: docker:stable-git
|
image: docker:stable-git
|
||||||
stage: check
|
stage: check
|
||||||
@ -36,17 +37,19 @@ build:
|
|||||||
script:
|
script:
|
||||||
- apk add --no-cache --upgrade bash coreutils
|
- apk add --no-cache --upgrade bash coreutils
|
||||||
# fetch dockerfile
|
# fetch dockerfile
|
||||||
- ./set-branch-name.sh && export BRANCH_NAME=$(cat branch_name) && echo ${BRANCH_NAME}
|
- BRANCH_NAME=$(echo ${CI_COMMIT_TAG} | sed 's/\-/\+/') && echo ${BRANCH_NAME}
|
||||||
- git clone -b ${BRANCH_NAME} --depth=1 https://gitlab.com/gitlab-org/omnibus-gitlab.git
|
- git clone -b ${BRANCH_NAME} --depth=1 https://gitlab.com/gitlab-org/omnibus-gitlab.git
|
||||||
- cd ./omnibus-gitlab/docker
|
- cd ./omnibus-gitlab/docker
|
||||||
# write RELEASE
|
# 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://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/focal/gitlab-ce_${CI_COMMIT_TAG}_arm64.deb/download.deb" >> RELEASE
|
- echo "PACKAGECLOUD_REPO=gitlab-ce" > RELEASE && echo "RELEASE_PACKAGE=gitlab-ce" >> RELEASE && echo "RELEASE_VERSION=${CI_COMMIT_TAG}" >> RELEASE && echo "DOWNLOAD_URL=https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/focal/gitlab-ce_${CI_COMMIT_TAG}_arm64.deb/download.deb" >> RELEASE
|
||||||
# use the same ubuntu version with the package
|
# debian:buster as base image
|
||||||
- sed -i 's/ubuntu:.*/ubuntu:focal/' ./Dockerfile
|
- sed -i 's/^FROM ubuntu.*/FROM debian\:buster/' Dockerfile
|
||||||
# missing package libatomic1 after version 13
|
# missing package libatomic1 after version 13
|
||||||
- sed -i 's/less/less libatomic1/' ./Dockerfile
|
- sed -i 's/less/less libatomic1/' Dockerfile
|
||||||
|
# debian has /etc/os-release instead of /etc/lsb-release
|
||||||
|
- sed -i 's/lsb-release/os-release/' assets/setup
|
||||||
# build
|
# build
|
||||||
- docker build -t ${DOCKER_NS}/${BASENAME}:${CI_COMMIT_TAG} -f ./Dockerfile ./
|
- docker build -t ${DOCKER_NS}/${BASENAME}:${CI_COMMIT_TAG} -f Dockerfile ./
|
||||||
# latest tag
|
# latest tag
|
||||||
- cd ../../ && git fetch --tags && ./latest-tag.sh
|
- cd ../../ && git fetch --tags && ./latest-tag.sh
|
||||||
# docker push
|
# docker push
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
IFS='.' read -ra NUMS <<< ${CI_COMMIT_TAG}
|
|
||||||
echo "${NUMS[0]}-${NUMS[1]}-stable" > branch_name
|
|
Loading…
Reference in New Issue
Block a user