Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-1.28] Add manifest pipeline for rke2-runtime docker image #6400

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,31 @@ jobs:
dapper -f Dockerfile --target dapper make publish-binary
env:
GH_TOKEN: ${{ github.token }}
manifest:
needs: [release-amd64, release-arm64]
runs-on: runs-on,runner=8cpu-linux-x64,run-id=${{ github.run_id }},image=ubuntu22-full-x64,hdd=64
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Dapper
run: |
curl -sL https://releases.rancher.com/dapper/latest/dapper-$(uname -s)-$(uname -m) > /usr/local/bin/dapper
chmod +x /usr/local/bin/dapper

- name: "Read secrets"
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/dockerhub/${{ github.repository_owner }}/credentials username | DOCKER_USERNAME ;
secret/data/github/repo/${{ github.repository }}/dockerhub/${{ github.repository_owner }}/credentials password | DOCKER_PASSWORD ;

- name: Manifest
run: |
GITHUB_ACTION_TAG=${{ github.ref_name }} dapper -f Dockerfile --target dapper make publish-manifest-runtime
env:
DOCKER_USERNAME: ${{ env.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ env.DOCKER_PASSWORD }}
dispatch:
needs: [release-amd64, release-arm64]
runs-on: runs-on,runner=8cpu-linux-x64,run-id=${{ github.run_id }},image=ubuntu22-full-x64,hdd=64
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ dev-peer-enter: ## Enter the peer shell on another termi
publish-manifest-kubernetes: build-image-kubernetes ## Create and push the kubernetes manifest
./scripts/publish-manifest-kubernetes

.PHONY: publish-manifest-runtime
publish-manifest-runtime: ## Create and push the runtime manifest
./scripts/publish-manifest-runtime

.PHONY: publish-binary
publish-binary: ## Upload binaries
./scripts/publish-binary
Expand Down
14 changes: 0 additions & 14 deletions manifest-runtime.tmpl

This file was deleted.

23 changes: 23 additions & 0 deletions scripts/publish-manifest-runtime
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -ex

cd $(dirname $0)/..

source ./scripts/version.sh
export DOCKER_CLI_EXPERIMENTAL=enabled

docker manifest create \
${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION} \
${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-linux-amd64 \
${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-linux-arm64 \
${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-windows-amd64

docker manifest annotate ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION} ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-linux-amd64 --os linux --arch amd64
docker manifest annotate ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION} ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-linux-arm64 --os linux --arch arm64
docker manifest annotate ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION} ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-windows-amd64 --os windows --arch amd64

set +x
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
set -x

docker manifest push ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}