From f864c9f5cbd51f86b195945672f28a9711d8cfe4 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Hernandez Date: Wed, 29 Jun 2022 21:20:45 +0000 Subject: [PATCH] Don't build/publish minideb in GCR Signed-off-by: Carlos Rodriguez Hernandez --- .github/workflows/main.yml | 6 ------ pushall | 10 ---------- pushmanifest | 14 -------------- pushone | 12 ------------ 4 files changed, 42 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 98f1763..987de12 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,9 +62,6 @@ jobs: env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - GCR_EMAIL: ${{ secrets.GCR_EMAIL }} - GCR_KEY: ${{ secrets.GCR_KEY }} - GCR_TOKEN: ${{ secrets.GCR_TOKEN }} DOCKER_CONTENT_TRUST_REPOSITORY_KEY: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_KEY }} DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }} run: | @@ -83,9 +80,6 @@ jobs: env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - GCR_EMAIL: ${{ secrets.GCR_EMAIL }} - GCR_KEY: ${{ secrets.GCR_KEY }} - GCR_TOKEN: ${{ secrets.GCR_TOKEN }} DOCKER_CONTENT_TRUST_REPOSITORY_KEY: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_KEY }} DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }} steps: diff --git a/pushall b/pushall index fe50499..1386e45 100755 --- a/pushall +++ b/pushall @@ -10,16 +10,11 @@ bullseye DISTS_WITH_SNAPSHOT="buster" LATEST=bullseye BASENAME=bitnami/minideb -GCR_BASENAME=gcr.io/bitnami-containers/minideb if [ -n "${DOCKER_PASSWORD:-}" ]; then docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" fi -if [ -n "${GCR_KEY:-}" ]; then - gcloud auth activate-service-account "$GCR_EMAIL" --key-file <(echo "$GCR_KEY") -fi - ENABLE_DOCKER_CONTENT_TRUST=0 if [ -n "${DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE:-}" ] && [ -n "${DOCKER_CONTENT_TRUST_REPOSITORY_KEY:-}" ]; then tmpdir=$(mktemp -d) @@ -33,11 +28,9 @@ fi push() { local dist="$1" DOCKER_CONTENT_TRUST=${ENABLE_DOCKER_CONTENT_TRUST} docker push "${BASENAME}:${dist}" - gcloud docker -- push "${GCR_BASENAME}:${dist}" } for DIST in $DISTS; do - docker tag "${BASENAME}:${DIST}" "${GCR_BASENAME}:${DIST}" push "$DIST" done @@ -46,14 +39,11 @@ if [ -f "build/snapshot_id" ]; then for DIST in $DISTS_WITH_SNAPSHOT; do TAG="${DIST}-snapshot-${snapshot_id}" - - docker tag "${BASENAME}:${TAG}" "${GCR_BASENAME}:${TAG}" push "${TAG}" done fi docker tag "${BASENAME}:${LATEST}" "${BASENAME}:latest" -docker tag "${GCR_BASENAME}:${LATEST}" "${GCR_BASENAME}:latest" push latest diff --git a/pushmanifest b/pushmanifest index 8ad0aa2..c64d9cf 100755 --- a/pushmanifest +++ b/pushmanifest @@ -11,7 +11,6 @@ latest DISTS_WITH_SNAPSHOT=${DISTS_WITH_SNAPSHOT:-buster} BASENAME=bitnami/minideb -GCR_BASENAME=gcr.io/bitnami-containers/minideb PLATFORMS=${PLATFORMS:-amd64 arm64} DRY_RUN=${DRY_RUN:-} SNAPSHOT_ID=${SNAPSHOT_ID:-} @@ -44,13 +43,6 @@ if [ -n "${DOCKER_PASSWORD:-}" ]; then echo "$DOCKER_PASSWORD" | run_docker login -u "$DOCKER_USERNAME" --password-stdin fi -if [ -n "${GCR_KEY:-}" ]; then - gcloud auth activate-service-account "$GCR_EMAIL" --key-file <(echo "$GCR_KEY") - gcloud auth print-access-token | run_docker login -u oauth2accesstoken --password-stdin gcr.io -elif [ -n "${GCR_TOKEN:-}" ]; then - echo "${GCR_TOKEN:-}" | run_docker login -u oauth2accesstoken --password-stdin gcr.io -fi - push_manifest() { local image="" local archs="" @@ -75,12 +67,6 @@ done repositories=("$BASENAME") -if [[ -n "${GCR_KEY:-}" || -n "${GCR_TOKEN:-}" ]]; then - repositories+=("$GCR_BASENAME") -else - echo "Skipping repository gcr.io (empty password)" -fi - for tag in "${tags[@]}"; do for repo in "${repositories[@]}"; do push_manifest "$repo:$tag" "${ARCHS[@]}" diff --git a/pushone b/pushone index 9abea99..f1064c9 100755 --- a/pushone +++ b/pushone @@ -8,19 +8,11 @@ DIST=${1:?Specify the distrubution name} PLATFORM=${2:-amd64} BASENAME=bitnami/minideb -GCR_BASENAME=gcr.io/bitnami-containers/minideb if [ -n "${DOCKER_PASSWORD:-}" ]; then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin fi -if [ -n "${GCR_KEY:-}" ]; then - gcloud auth activate-service-account "$GCR_EMAIL" --key-file <(echo "$GCR_KEY") - gcloud auth print-access-token | docker login -u oauth2accesstoken --password-stdin gcr.io -elif [ -n "${GCR_TOKEN:-}" ]; then - echo "${GCR_TOKEN:-}" | docker login -u oauth2accesstoken --password-stdin gcr.io -fi - ENABLE_DOCKER_CONTENT_TRUST=0 if [ -n "${DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE:-}" ] && [ -n "${DOCKER_CONTENT_TRUST_REPOSITORY_KEY:-}" ]; then tmpdir=$(mktemp -d) @@ -34,10 +26,6 @@ fi push() { local dist="$1" DOCKER_CONTENT_TRUST=${ENABLE_DOCKER_CONTENT_TRUST} docker push "${BASENAME}:${dist}" - docker push "${GCR_BASENAME}:${dist}" } -docker tag "${BASENAME}:${DIST}-${PLATFORM}" "${GCR_BASENAME}:${DIST}-${PLATFORM}" - push "$DIST-${PLATFORM}" -