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.29] Publish binaries in dapper #6380

Merged
merged 3 commits into from
Jul 20, 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
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ jobs:

- name: Publish Artifacts
run: |
gh release upload ${{ github.ref_name }} dist/artifacts/*
dapper -f Dockerfile --target dapper make publish-binary
env:
GH_TOKEN: ${{ github.token }}
release-arm64:
runs-on: runs-on,runner=8cpu-linux-arm64,run-id=${{ github.run_id }},image=ubuntu22-full-arm64,hdd=256
steps:
Expand Down Expand Up @@ -118,7 +120,9 @@ jobs:

- name: Publish Artifacts
run: |
gh release upload ${{ github.ref_name }} dist/artifacts/*
dapper -f Dockerfile --target dapper make publish-binary
env:
GH_TOKEN: ${{ github.token }}
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 All @@ -135,7 +139,7 @@ jobs:
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/pat_username/credentials token | PAT_USERNAME ;
secret/data/github/repo/${{ github.repository }}/pat-username/credentials token | PAT_USERNAME ;

- name: Dispatch
run: |
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN zypper install -y systemd-rpm-macros

# Dapper/Drone/CI environment
FROM build AS dapper
ENV DAPPER_ENV GODEBUG GOCOVER REPO TAG GITHUB_ACTION_TAG PAT_USERNAME PAT_TOKEN KUBERNETES_VERSION DOCKER_BUILDKIT DRONE_BUILD_EVENT IMAGE_NAME AWS_SECRET_ACCESS_KEY AWS_ACCESS_KEY_ID ENABLE_REGISTRY DOCKER_USERNAME DOCKER_PASSWORD
ENV DAPPER_ENV GODEBUG GOCOVER REPO TAG GITHUB_ACTION_TAG PAT_USERNAME PAT_TOKEN KUBERNETES_VERSION DOCKER_BUILDKIT DRONE_BUILD_EVENT IMAGE_NAME AWS_SECRET_ACCESS_KEY AWS_ACCESS_KEY_ID ENABLE_REGISTRY DOCKER_USERNAME DOCKER_PASSWORD GH_TOKEN
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH
ENV DAPPER_OUTPUT ./dist ./bin ./build
Expand All @@ -42,6 +42,10 @@ RUN if [ "${ARCH}" = "amd64" ] || [ "${ARCH}" = "arm64" ]; then \
curl -sL "https://github.com/vmware-tanzu/sonobuoy/releases/download/v${VERSION}/sonobuoy_${VERSION}_${OS}_${ARCH}.tar.gz" | \
tar -xzf - -C /usr/local/bin; \
fi

RUN curl -sL "https://github.com/cli/cli/releases/download/v2.53.0/gh_2.53.0_linux_${ARCH}.tar.gz" | \
tar --strip-components=2 -xzvf - -C /usr/local/bin gh_2.53.0_linux_${ARCH}/bin/gh;

RUN curl -sL https://dl.k8s.io/release/$( \
curl -sL https://dl.k8s.io/release/stable.txt \
)/bin/linux/${ARCH}/kubectl -o /usr/local/bin/kubectl && \
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-binary
publish-binary: ## Upload binaries
./scripts/publish-binary

.PHONY: dispatch
dispatch: ## Send dispatch event to rke2-upgrade repo
./scripts/dispatch
Expand Down
10 changes: 10 additions & 0 deletions scripts/publish-binary
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -ex

cd $(dirname $0)/..

source ./scripts/version.sh

mkdir -p dist/artifacts

gh release upload ${VERSION} dist/artifacts/*