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

remove gcloud docker -- since it's deprecated #60376

Merged
merged 1 commit into from
Feb 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/build-image/cross/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ build:
docker build --pull -t staging-k8s.gcr.io/$(IMAGE):$(TAG) .

push: build
gcloud docker -- push staging-k8s.gcr.io/$(IMAGE):$(TAG)
docker push staging-k8s.gcr.io/$(IMAGE):$(TAG)
2 changes: 1 addition & 1 deletion build/debian-base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ endif
rm -rf $(TEMP_DIR)

push: build
gcloud docker -- push $(REGISTRY)/$(IMAGE)-$(ARCH):$(TAG)
docker push $(REGISTRY)/$(IMAGE)-$(ARCH):$(TAG)

clean:
docker rmi -f $(REGISTRY)/$(IMAGE)-$(ARCH):$(TAG) || true
Expand Down
2 changes: 1 addition & 1 deletion build/debian-hyperkube-base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ endif
rm -rf $(TEMP_DIR)

push: build
gcloud docker -- push $(REGISTRY)/$(IMAGE)-$(ARCH):$(TAG)
docker push $(REGISTRY)/$(IMAGE)-$(ARCH):$(TAG)
2 changes: 1 addition & 1 deletion build/debian-iptables/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ endif
docker build --pull -t $(REGISTRY)/$(IMAGE)-$(ARCH):$(TAG) $(TEMP_DIR)

push: build
gcloud docker -- push $(REGISTRY)/$(IMAGE)-$(ARCH):$(TAG)
docker push $(REGISTRY)/$(IMAGE)-$(ARCH):$(TAG)

all: push
2 changes: 1 addition & 1 deletion build/pause/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ container: .container-$(ARCH)

push: .push-$(ARCH)
.push-$(ARCH): .container-$(ARCH)
gcloud docker -- push $(IMAGE_WITH_ARCH):$(TAG)
docker push $(IMAGE_WITH_ARCH):$(TAG)
touch $@

# Useful for testing, not automatically included in container image
Expand Down
4 changes: 2 additions & 2 deletions cluster/addons/addon-manager/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ build:
docker build --pull -t $(IMAGE)-$(ARCH):$(VERSION) $(TEMP_DIR)

push: build
gcloud docker -- push $(IMAGE)-$(ARCH):$(VERSION)
docker push $(IMAGE)-$(ARCH):$(VERSION)
ifeq ($(ARCH),amd64)
# Backward compatibility. TODO: deprecate this image tag
docker rmi $(IMAGE):$(VERSION) 2>/dev/null || true
docker tag $(IMAGE)-$(ARCH):$(VERSION) $(IMAGE):$(VERSION)
gcloud docker -- push $(IMAGE):$(VERSION)
docker push $(IMAGE):$(VERSION)
endif

clean:
Expand Down
2 changes: 1 addition & 1 deletion cluster/addons/fluentd-elasticsearch/es-image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ build:
docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) .

push:
gcloud docker -- push $(PREFIX)/$(IMAGE):$(TAG)
docker push $(PREFIX)/$(IMAGE):$(TAG)

binary:
CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-w" elasticsearch_logging_discovery.go
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ build:
docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) .

push:
gcloud docker -- push $(PREFIX)/$(IMAGE):$(TAG)
docker push $(PREFIX)/$(IMAGE):$(TAG)
2 changes: 1 addition & 1 deletion cluster/addons/python-image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ build:
docker build --pull -t "$(IMAGE):$(VERSION)" .

push:
gcloud docker -- push "$(IMAGE):$(VERSION)"
docker push "$(IMAGE):$(VERSION)"

2 changes: 1 addition & 1 deletion cluster/gce/gci/mounter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ container:
docker build --pull -t ${REGISTRY}/${IMAGE}:${TAG} .

push:
gcloud docker -- push ${REGISTRY}/${IMAGE}:${TAG}
docker push ${REGISTRY}/${IMAGE}:${TAG}

upload:
./stage-upload.sh ${TAG} ${REGISTRY}/${IMAGE}:${TAG}
Expand Down
2 changes: 1 addition & 1 deletion cluster/images/etcd-empty-dir-cleanup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ build: clean
rm -rf etcdctl etcd-v$(ETCD_VERSION)-linux-amd64 etcd-v$(ETCD_VERSION)-linux-amd64.tar.gz

push: build
gcloud docker -- push $(IMAGE):$(TAG)
docker push $(IMAGE):$(TAG)
2 changes: 1 addition & 1 deletion cluster/images/etcd-version-monitor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ build:
docker build -t $(IMAGE) $(TEMP_DIR)

push: build
gcloud docker -- push $(IMAGE)
docker push $(IMAGE)

all: build

Expand Down
4 changes: 2 additions & 2 deletions cluster/images/etcd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ endif
docker build --pull -t $(REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG) $(TEMP_DIR)

push: build
gcloud docker -- push $(REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG)
docker push $(REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG)

ifeq ($(ARCH),amd64)
# Backward compatibility. TODO: deprecate this image tag
docker tag $(REGISTRY)/etcd-$(ARCH):$(REGISTRY_TAG) $(REGISTRY)/etcd:$(REGISTRY_TAG)
gcloud docker -- push $(REGISTRY)/etcd:$(REGISTRY_TAG)
docker push $(REGISTRY)/etcd:$(REGISTRY_TAG)
endif

ETCD2_ROLLBACK_NEW_TAG=3.0.17
Expand Down
4 changes: 2 additions & 2 deletions cluster/images/hyperkube/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ endif
rm -rf "${TEMP_DIR}"

push: build
gcloud docker -- push ${REGISTRY}/hyperkube-${ARCH}:${VERSION}
docker push ${REGISTRY}/hyperkube-${ARCH}:${VERSION}
ifeq ($(ARCH),amd64)
docker rmi ${REGISTRY}/hyperkube:${VERSION} 2>/dev/null || true
docker tag ${REGISTRY}/hyperkube-${ARCH}:${VERSION} ${REGISTRY}/hyperkube:${VERSION}
gcloud docker -- push ${REGISTRY}/hyperkube:${VERSION}
docker push ${REGISTRY}/hyperkube:${VERSION}
endif

.PHONY: build push all
2 changes: 1 addition & 1 deletion cluster/images/kubemark/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ build:
docker build --pull -t $(REGISTRY)/kubemark:$(IMAGE_TAG) .

gcloudpush: build
gcloud docker -- push $(REGISTRY)/kubemark:$(IMAGE_TAG)
docker push $(REGISTRY)/kubemark:$(IMAGE_TAG)

push: build
docker -- push $(REGISTRY)/kubemark:$(IMAGE_TAG)
Expand Down
4 changes: 2 additions & 2 deletions test/e2e_node/conformance/build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ endif
docker build --pull -t ${IMAGE_NAME}-${ARCH}:${VERSION} ${TEMP_DIR}

push: build
gcloud docker -- push ${IMAGE_NAME}-${ARCH}:${VERSION}
docker push ${IMAGE_NAME}-${ARCH}:${VERSION}
ifeq ($(ARCH),amd64)
docker tag ${IMAGE_NAME}-${ARCH}:${VERSION} ${IMAGE_NAME}:${VERSION}
gcloud docker -- push ${IMAGE_NAME}:${VERSION}
docker push ${IMAGE_NAME}:${VERSION}
endif

.PHONY: all
2 changes: 1 addition & 1 deletion test/images/image-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ push() {
fi
for arch in ${archs}; do
TAG=$(<${IMAGE}/VERSION)
gcloud docker -- push ${REGISTRY}/${IMAGE}-${arch}:${TAG}
docker push ${REGISTRY}/${IMAGE}-${arch}:${TAG}
done
}

Expand Down
4 changes: 2 additions & 2 deletions test/images/volumes-tester/ceph/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ image:
docker tag $(PREFIX)/volume-ceph $(PREFIX)/volume-ceph:$(TAG) # Add the version tag to the latest image

push: image
gcloud docker -- push $(PREFIX)/volume-ceph # Push image tagged as latest to repository
gcloud docker -- push $(PREFIX)/volume-ceph:$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
docker push $(PREFIX)/volume-ceph # Push image tagged as latest to repository
docker push $(PREFIX)/volume-ceph:$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)

clean:
4 changes: 2 additions & 2 deletions test/images/volumes-tester/gluster/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ image:
docker tag $(PREFIX)/volume-gluster $(PREFIX)/volume-gluster:$(TAG) # Add the version tag to the latest image

push: image
gcloud docker -- push $(PREFIX)/volume-gluster # Push image tagged as latest to repository
gcloud docker -- push $(PREFIX)/volume-gluster:$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
docker push $(PREFIX)/volume-gluster # Push image tagged as latest to repository
docker push $(PREFIX)/volume-gluster:$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)

clean:
4 changes: 2 additions & 2 deletions test/images/volumes-tester/iscsi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ block:

push: image
# Push image tagged as latest to repository
gcloud docker -- push $(PREFIX)/volume-iscsi
docker push $(PREFIX)/volume-iscsi
# Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
gcloud docker -- push $(PREFIX)/volume-iscsi:$(TAG)
docker push $(PREFIX)/volume-iscsi:$(TAG)

clean:
4 changes: 2 additions & 2 deletions test/images/volumes-tester/nfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ image:
docker tag $(PREFIX)/volume-nfs $(PREFIX)/volume-nfs:$(TAG) # Add the version tag to the latest image

push: image
gcloud docker -- push $(PREFIX)/volume-nfs # Push image tagged as latest to repository
gcloud docker -- push $(PREFIX)/volume-nfs:$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
docker push $(PREFIX)/volume-nfs # Push image tagged as latest to repository
docker push $(PREFIX)/volume-nfs:$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)

clean:
4 changes: 2 additions & 2 deletions test/images/volumes-tester/rbd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ block:

push: image
# Push image tagged as latest to repository
gcloud docker -- push $(PREFIX)/volume-rbd
docker push $(PREFIX)/volume-rbd
# Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
gcloud docker -- push $(PREFIX)/volume-rbd:$(TAG)
docker push $(PREFIX)/volume-rbd:$(TAG)

clean:
2 changes: 1 addition & 1 deletion test/images/webhook/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ build:
docker build --no-cache -t gcr.io/kubernetes-e2e-test-images/k8s-sample-admission-webhook-amd64:1.9v1 .
rm -rf webhook
push:
gcloud docker -- push gcr.io/kubernetes-e2e-test-images/k8s-sample-admission-webhook-amd64:1.9v1
docker push gcr.io/kubernetes-e2e-test-images/k8s-sample-admission-webhook-amd64:1.9v1
8 changes: 8 additions & 0 deletions test/kubemark/start-kubemark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ function create-and-upload-hollow-node-image {
exit 1
fi

echo "Configuring registry authentication"
mkdir -p "${HOME}/.docker"
gcloud beta auth configure-docker -q
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @kubernetes/test-infra-maintainers I wonder if this is a step we should be doing in bootstrap?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hummm, I remember I tried it in CI and did not work

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yet mysteriously it's working in the pull-kubernetes-kubemark-e2e-gce job?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bump gcloud? just a guess.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, I figured it out, because I ran into the same issue - gcloud doesn't check to see if $HOME/.docker exists yet, and fails if it doesn't. this PR works because we do mkdir -p first.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker isn't booted in every random job so doing it early in bootstrap is probably not the best idea. /shrug


echo "Copying kubemark binary to ${MAKE_DIR}"
cp "${KUBEMARK_BIN}" "${MAKE_DIR}"
CURR_DIR=`pwd`
Expand All @@ -223,6 +227,10 @@ function create-and-upload-hollow-node-image {
# Use bazel rule to create a docker image for hollow-node and upload
# it to the appropriate docker container registry for the cloud provider.
function create-and-upload-hollow-node-image-bazel {
echo "Configuring registry authentication"
mkdir -p "${HOME}/.docker"
gcloud beta auth configure-docker -q

RETRIES=3
for attempt in $(seq 1 ${RETRIES}); do
if ! bazel run //cluster/images/kubemark:push --define REGISTRY="${FULL_REGISTRY}" --define IMAGE_TAG="${KUBEMARK_IMAGE_TAG}"; then
Expand Down