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

Push the CoreDNS 1.6.5 image in gcr.io #84993

Closed
rajansandeep opened this issue Nov 8, 2019 · 5 comments

Comments

@rajansandeep
Copy link
Member

@rajansandeep rajansandeep commented Nov 8, 2019

Need to push the latest CoreDNS image to gcr.io
The 1.6.5 image is available in docker coredns/coredns:1.6.5

This is the script used for pushing the image:

#!/bin/sh

if [ -z "$1" -o -z "$2" -o -z "$3" -o -z "$4" ]; then
    echo "usage: $0 <src-reg> <image> <tag> <dst-reg>" > /dev/stderr
    echo "example: $0 coredns coredns 1.6.5 staging-k8s.gcr.io" > /dev/stderr
    exit 1
fi

SRC_REG="$1"
IMG="$2"
TAG="$3"
DST_REG="$4"
TMP="/tmp/$RANDOM"
JSON="$TMP.json"

echo "Fetching source manifest"
docker manifest inspect ${SRC_REG}/${IMG}:${TAG} > ${JSON}

echo
echo "Pulling source images by SHA"
cat ${JSON} \
    | jq -j ".manifests[] | \"${SRC_REG}/${IMG}@\", .digest, \"\n\" " \
    | while read X; do docker pull $X; done

echo
echo "Tagging images with ARCH and OS"
cat ${JSON} \
    | jq -j ".manifests[] | \"docker tag ${SRC_REG}/${IMG}@\", .digest, \" ${DST_REG}/${IMG}:${TAG}__\", .platform.architecture, \"_\", .platform.os, \"\n\"" \
    | while read X; do $X; done

echo
echo "Pushing images"
cat ${JSON} \
    | jq -j ".manifests[] | \"gcloud docker -- push ${DST_REG}/${IMG}:${TAG}__\", .platform.architecture, \"_\", .platform.os, \"\n\"" \
    | while read X; do $X; done

echo
echo "Creating and pushing manifest"
PLATFORMS=$(cat ${JSON} | jq -j ".manifests[] | .platform.os, \"/\", .platform.architecture, \"\n\"" | paste -sd,)
echo manifest-tool push from-args \
    --platforms "${PLATFORMS}" \
    --template ${DST_REG}/${IMG}:${TAG}__ARCH_OS \
    --target ${DST_REG}/${IMG}:${TAG}
manifest-tool push from-args \
    --platforms "${PLATFORMS}" \
    --template ${DST_REG}/${IMG}:${TAG}__ARCH_OS \
    --target ${DST_REG}/${IMG}:${TAG}

/cc @chrisohaver
/assign @thockin

/sig network
/sig cluster-lifecycle

@athenabot

This comment has been minimized.

Copy link

@athenabot athenabot commented Nov 8, 2019

/triage unresolved

Comment /remove-triage unresolved when the issue is assessed and confirmed.

🤖 I am a bot run by vllry. 👩‍🔬

@chrisohaver

This comment has been minimized.

Copy link
Contributor

@chrisohaver chrisohaver commented Nov 8, 2019

/remove-triage unresolved

@thockin

This comment has been minimized.

Copy link
Member

@thockin thockin commented Nov 11, 2019

@rajansandeep

This comment has been minimized.

Copy link
Member Author

@rajansandeep rajansandeep commented Nov 12, 2019

Image is live
/close

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

@k8s-ci-robot k8s-ci-robot commented Nov 12, 2019

@rajansandeep: Closing this issue.

In response to this:

Image is live
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.