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

update upload-test-images.sh to compatible with docker hub #725

Merged
merged 1 commit into from
Jan 22, 2019
Merged
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
9 changes: 5 additions & 4 deletions test/upload-test-images.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2018 The Knative Authors
#
Expand All @@ -22,10 +22,11 @@ function upload_test_images() {
local docker_tag=$1

for image_dir in ${image_dirs}; do
local image="github.com/knative/eventing/test/test_images/$(basename ${image_dir})"
ko publish -P ${image}
local image_name="$(basename ${image_dir})"
local image="github.com/knative/eventing/test/test_images/${image_name}"
ko publish -B ${image}
if [ -n "$docker_tag" ]; then
image=$KO_DOCKER_REPO/${image}
image=$KO_DOCKER_REPO/${image_name}
local digest=$(gcloud container images list-tags --filter="tags:latest" --format='get(digest)' ${image})
echo "Tagging ${image}@${digest} with $docker_tag"
gcloud -q container images add-tag ${image}@${digest} ${image}:$docker_tag
Expand Down