-
Notifications
You must be signed in to change notification settings - Fork 764
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
Fix quay manifest cache issue #672
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ env: | |
|
||
jobs: | ||
lint: | ||
name: 'Lint' | ||
name: "Lint" | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
|
@@ -48,12 +48,12 @@ jobs: | |
make lint | ||
|
||
build_test: | ||
name: 'Build and Test' | ||
name: "Build and Test" | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Set up Go 1.13 | ||
uses: actions/setup-go@v2-beta | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.13 | ||
id: go | ||
|
@@ -76,7 +76,7 @@ jobs: | |
kubectl logs -n gatekeeper-system -l control-plane=controller-manager | ||
|
||
helm_build_test: | ||
name: '[Helm] Build and Test' | ||
name: "[Helm] Build and Test" | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
|
@@ -104,8 +104,8 @@ jobs: | |
kubectl logs -n gatekeeper-system -l control-plane=controller-manager | ||
|
||
pre-release: | ||
name: 'Pre Release' | ||
runs-on: 'ubuntu-latest' | ||
name: "Pre Release" | ||
runs-on: "ubuntu-latest" | ||
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'open-policy-agent/gatekeeper' | ||
needs: [lint, build_test, helm_build_test] | ||
timeout-minutes: 30 | ||
|
@@ -126,16 +126,16 @@ jobs: | |
DOCKER_USER: ${{ secrets.DOCKER_USER }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- uses: 'marvinpinto/[email protected]' | ||
- uses: "marvinpinto/[email protected]" | ||
with: | ||
repo_token: '${{ secrets.GITHUB_TOKEN }}' | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: true | ||
automatic_release_tag: latest | ||
title: 'Development Build' | ||
title: "Development Build" | ||
|
||
tagged-release: | ||
name: 'Tagged Release' | ||
runs-on: 'ubuntu-latest' | ||
name: "Tagged Release" | ||
runs-on: "ubuntu-latest" | ||
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'open-policy-agent/gatekeeper' | ||
needs: [lint, build_test, helm_build_test] | ||
timeout-minutes: 30 | ||
|
@@ -173,7 +173,7 @@ jobs: | |
make e2e-verify-release IMG=${{ env.IMAGE_REPO }}:${TAG} USE_LOCAL_IMG=false | ||
|
||
- name: Create GitHub release | ||
uses: 'marvinpinto/[email protected]' | ||
uses: "marvinpinto/[email protected]" | ||
with: | ||
repo_token: '${{ secrets.GITHUB_TOKEN }}' | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: false |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -195,19 +195,37 @@ docker-buildx-dev: test | |
@if ! DOCKER_CLI_EXPERIMENTAL=enabled docker buildx ls | grep -q container-builder; then\ | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx create --name container-builder --use;\ | ||
fi | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform "linux/amd64,linux/arm64,linux/arm/v7" \ | ||
-t $(REPOSITORY):$(DEV_TAG) \ | ||
-t $(REPOSITORY):dev \ | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform "linux/amd64" \ | ||
-t $(REPOSITORY):$(DEV_TAG)-linux-amd64 \ | ||
. --push | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform "linux/arm64" \ | ||
-t $(REPOSITORY):$(DEV_TAG)-linux-arm64 \ | ||
. --push | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform "linux/arm/v7" \ | ||
-t $(REPOSITORY):$(DEV_TAG)-linux-armv7 \ | ||
. --push | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create $(REPOSITORY):$(DEV_TAG) $(REPOSITORY):$(DEV_TAG)-linux-amd64 $(REPOSITORY):$(DEV_TAG)-linux-arm64 $(REPOSITORY):$(DEV_TAG)-linux-armv7 | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create $(REPOSITORY):dev $(REPOSITORY):$(DEV_TAG)-linux-amd64 $(REPOSITORY):$(DEV_TAG)-linux-arm64 $(REPOSITORY):$(DEV_TAG)-linux-armv7 | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push $(REPOSITORY):$(DEV_TAG) | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push $(REPOSITORY):dev | ||
Comment on lines
+209
to
+210
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't see this in my previous PR until now, we don't need both these to be pushed
Makefile L7 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not pushing the same tag twice. If you look at the comment above L7, DEV_TAG gets overriden by 7-digit SHA. It's pushing SHA tag + |
||
|
||
docker-buildx-release: test | ||
@if ! DOCKER_CLI_EXPERIMENTAL=enabled docker buildx ls | grep -q container-builder; then\ | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx create --name container-builder --use;\ | ||
fi | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform "linux/amd64,linux/arm64,linux/arm/v7" \ | ||
-t $(REPOSITORY):$(VERSION) \ | ||
-t $(REPOSITORY):latest \ | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform "linux/amd64" \ | ||
-t $(REPOSITORY):$(VERSION)-linux-amd64 \ | ||
. --push | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform "linux/arm64" \ | ||
-t $(REPOSITORY):$(VERSION)-linux-arm64 \ | ||
. --push | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform "linux/arm/v7" \ | ||
-t $(REPOSITORY):$(VERSION)-linux-armv7 \ | ||
. --push | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create $(REPOSITORY):$(VERSION) $(REPOSITORY):$(VERSION)-linux-amd64 $(REPOSITORY):$(VERSION)-linux-arm64 $(REPOSITORY):$(VERSION)-linux-armv7 | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create $(REPOSITORY):latest $(REPOSITORY):$(VERSION)-linux-amd64 $(REPOSITORY):$(VERSION)-linux-arm64 $(REPOSITORY):$(VERSION)-linux-armv7 | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push $(REPOSITORY):$(VERSION) | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push $(REPOSITORY):latest | ||
|
||
# Update manager_image_patch.yaml with image tag | ||
patch-image: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't the issue and also defeats the purpose of a multi-arch image where we don't want to re-tag them rather we want an image that is already multi-arch.
This should remain being
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a workaround for the Quay issue. We can not push same tag to Quay twice using buildx, which will be required for release (pushing latest + version).
Open to suggestions for another fix or workaround