diff --git a/Dockerfile.dapper b/Dockerfile.dapper index e12008cc0..d2e8c932b 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -2,7 +2,7 @@ ARG BASE_BRANCH FROM quay.io/submariner/shipyard-dapper-base:${BASE_BRANCH} ARG PROJECT -ENV DAPPER_ENV="QUAY_USERNAME QUAY_PASSWORD CLUSTERS_ARGS DEPLOY_ARGS CLEANUP_ARGS E2E_ARGS RELEASE_ARGS MAKEFLAGS FOCUS SKIP PLUGIN E2E_TESTDIR" \ +ENV DAPPER_ENV="QUAY_USERNAME QUAY_PASSWORD CLUSTERS_ARGS DEPLOY_ARGS CLEANUP_ARGS E2E_ARGS RELEASE_ARGS MAKEFLAGS FOCUS SKIP PLUGIN E2E_TESTDIR GITHUB_USER GITHUB_TOKEN" \ DAPPER_SOURCE=/go/src/github.com/submariner-io/${PROJECT} DAPPER_DOCKER_SOCKET=true ENV DAPPER_OUTPUT=${DAPPER_SOURCE}/output diff --git a/Makefile b/Makefile index b42765780..15bc6a277 100644 --- a/Makefile +++ b/Makefile @@ -70,10 +70,7 @@ prune-images: fi \ done -backport: - scripts/shared/backport.sh $(release) $(pr) - -NON_DAPPER_GOALS += prune-images backport +NON_DAPPER_GOALS += prune-images .PHONY: prune-images include Makefile.dapper diff --git a/Makefile.inc b/Makefile.inc index e14d8a25f..e14c8c4e4 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -192,6 +192,11 @@ vendor/modules.txt: go.mod CODEOWNERS: CODEOWNERS.in $(SCRIPTS_DIR)/gen-codeowners +# [backport] creates a PR to backport the PR identified by pr= to the release identified by release= +# This needs gh, and a GITHUB_TOKEN with repo and read:org +backport: + $(SCRIPTS_DIR)/backport.sh $(release) $(pr) + # [prune-images] removes all Submariner-provided images and all untagged images # Use this to ensure you use current images # Copied from Makefile to provide this everywhere (until we can share diff --git a/package/Dockerfile.shipyard-dapper-base b/package/Dockerfile.shipyard-dapper-base index 575c73455..afb6e1426 100644 --- a/package/Dockerfile.shipyard-dapper-base +++ b/package/Dockerfile.shipyard-dapper-base @@ -16,6 +16,7 @@ ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH} PATH=/go/bin:/usr/loc # curl | download other tools # findutils | make unit (find unit test dirs) # gcc | needed by `go test -race` (https://github.com/golang/go/issues/27089) +# gh | backport, releases # ginkgo | tests # git | find the workspace root # gitlint | Commit message linting @@ -53,7 +54,8 @@ RUN dnf -y install --nodocs --setopt=install_weak_deps=False \ ENV LINT_VERSION=v1.42.1 \ HELM_VERSION=v3.4.1 \ KIND_VERSION=v0.11.1 \ - BUILDX_VERSION=v0.5.1 + BUILDX_VERSION=v0.5.1 \ + GH_VERSION=2.2.0 # This layer's versioning is determined by us, and thus could be rebuilt more frequently to test different versions RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin -d ${LINT_VERSION} && \ @@ -64,6 +66,9 @@ RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/i mkdir -p ~/.docker/cli-plugins && \ curl -L "https://github.com/docker/buildx/releases/download/${BUILDX_VERSION}/buildx-${BUILDX_VERSION}.linux-${ARCH}" -o ~/.docker/cli-plugins/docker-buildx && \ chmod 755 ~/.docker/cli-plugins/docker-buildx && \ + curl -L https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_${ARCH}.tar.gz | tar xzf - && \ + mv gh_${GH_VERSION}_linux_${ARCH}/bin/gh /go/bin/ && \ + rm -rf gh_${GH_VERSION}_linux_${ARCH} && \ find /go/bin ~/.docker/cli-plugins -type f -executable -newercc /proc -exec strip {} + && \ find /go/bin ~/.docker/cli-plugins -type f -executable -newercc /proc \( -execdir upx ${UPX_LEVEL} {} \; -o -true \)