Commit 8f3eaab3 authored by hashworks's avatar hashworks Committed by Sven-Hendrik Haase
Browse files

Remove old tags as recommended by @tianon

> Removing tags here will remove them from the "Supported" section on
> the Hub readme (and will prevent us from spending cycles rebuilding them
> on the official build servers), but the tags will still be available to
> users who want them.
> See https://github.com/docker-library/official-images#library-definition-files
> for more detail on this.
parent b8283cff
......@@ -175,6 +175,7 @@ release:
variables:
- $SCHEDULED_PUBLISH == "TRUE"
before_script:
- apk update
- apk add jq curl
script:
- |
......@@ -190,7 +191,7 @@ release:
sed -i "s|TEMPLATE_ROOTFS_HASH|$(cat output/${group}.tar.xz.SHA256)|" output/Dockerfile.${group}
done
- >
curl -sSf --request POST
curl -sSf --request POST -o commit-response.json
--header "PRIVATE-TOKEN: ${GITLAB_PROJECT_TOKEN}"
--form "branch=releases"
--form "commit_message=Release ${BUILD_VERSION}"
......@@ -204,6 +205,7 @@ release:
--form "actions[][file_path]=.gitlab-ci.yml"
--form "actions[][content]=<.gitlab-ci.yml"
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/repository/commits"
- echo "BUILD_COMMIT=$(jq -r '.id' commit-response.json)" >> build.env
- |
base_url=$(./ci/get-public-download-for-generic-package.sh base-${BUILD_VERSION}.tar.xz)
echo "${base_url}"
......@@ -223,6 +225,9 @@ release:
--assets-link "{\"name\":\"base-${BUILD_VERSION}.tar.xz.SHA256\",\"url\":\"${base_sha_url}\"}" \
--assets-link "{\"name\":\"base-devel-${BUILD_VERSION}.tar.xz\",\"url\":\"${base_devel_url}\"}" \
--assets-link "{\"name\":\"base-devel-${BUILD_VERSION}.tar.xz.SHA256\",\"url\":\"${base_devel_sha_url}\"}"
artifacts:
reports:
dotenv: build.env
# Publish base to the Arch Linux group namespace: https://hub.docker.com/r/archlinux/archlinux
publish:
......@@ -244,5 +249,44 @@ publish:
- crane tag archlinux/archlinux:base-devel-$BUILD_VERSION base-devel
# Publish to the official Docker namespace: https://hub.docker.com/_/archlinux
# publish:official:
# TODO No idea right now how we're going to automatically do the official Docker Hub pull request
publish:official:
stage: publish
only:
refs:
- schedules
variables:
- $SCHEDULED_PUBLISH == "TRUE"
before_script:
- export | grep -q BUILD_VERSION=
- export | grep -q BUILD_COMMIT=
- test -n "$BUILD_VERSION"
- test -n "$BUILD_COMMIT"
- test -n "$GITHUB_TOKEN"
- pacman -Syu --noconfirm github-cli git gettext
- git config --global user.email "github@archlinux.org"
- git config --global user.name "Arch Linux Technical User"
script:
- mkdir official-images
- cd official-images
- git init
- 'git remote add origin "https://x-access-token:${GITHUB_TOKEN}@github.com/archlinux/official-images.git"'
- git fetch --depth=1 https://github.com/docker-library/official-images.git
- git reset --hard FETCH_HEAD
- head="release/${BUILD_VERSION}"
- git checkout -b "$head"
- envsubst < ../docker-library.template > library/archlinux
- git diff
- git add library/archlinux
- maintainers="$(grep \(@ ../docker-library.template | cut -d\( -f2 | cut -d\) -f1 | xargs)"
- test -n "$maintainers"
- 'git commit
-m "archlinux: Release ${BUILD_VERSION}"
-m "This is an automated release [1]."
-m "Maintainers: ${maintainers}"
-m "[1] ${CI_PROJECT_URL}/-/blob/master/.gitlab-ci.yml"'
- git push -u origin "$head"
- gh pr create
--repo docker-library/official-images
--fill
--base master
--head archlinux:"$head"
# https://gitlab.archlinux.org/archlinux/archlinux-docker
Maintainers: Santiago Torres-Arias <santiago@archlinux.org> (@SantiagoTorres),
Christian Rebischke <Chris.Rebischke@archlinux.org> (@shibumi),
Pierre Schmitz <pierre@archlinux.de> (@pierres),
Justin Kromlinger <hashworks@archlinux.org> (@hashworks)
GitRepo: https://github.com/archlinux/archlinux-docker.git
Tags: latest, base, base-${BUILD_VERSION}
GitCommit: ${BUILD_COMMIT}
GitFetch: refs/tags/v${BUILD_VERSION}
File: Dockerfile.base
Tags: base-devel, base-devel-${BUILD_VERSION}
GitCommit: ${BUILD_COMMIT}
GitFetch: refs/tags/v${BUILD_VERSION}
File: Dockerfile.base-devel
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment