@@ -37,8 +37,7 @@ curl -L https://github.com/kubernetes/minikube/raw/master/pkg/drivers/kic/types.
3737# kicbase tags are of the form VERSION-TIMESTAMP-PR, so this grep finds that TIMESTAMP in the middle
3838# if it doesn't exist, it will just return VERSION, which is covered in the if statement below
3939HEAD_KIC_TIMESTAMP=$( egrep " Version =" types-head.go | cut -d \" -f 2 | cut -d " -" -f 2)
40- CURRENT_KIC_VERSION=$( egrep " Version =" pkg/drivers/kic/types.go | cut -d \" -f 2)
41- CURRENT_KIC_TS=$( echo $CURRENT_KIC_VERSION | cut -d " -" -f 2)
40+ CURRENT_KIC_TS=$( egrep " Version =" pkg/drivers/kic/types.go | cut -d \" -f 2 | cut -d " -" -f 2)
4241if [[ $HEAD_KIC_TIMESTAMP != v* ]]; then
4342 diff=$(( CURRENT_KIC_TS- HEAD_KIC_TIMESTAMP))
4443 if [[ $CURRENT_KIC_TS == v* ]] || [ $diff -lt 0 ]; then
@@ -68,33 +67,18 @@ GCR_IMG=${GCR_REPO}:${KIC_VERSION}
6867DH_IMG=${DH_REPO} :${KIC_VERSION}
6968export KICBASE_IMAGE_REGISTRIES=" ${GCR_IMG} ${DH_IMG} "
7069
71- if [ " $release " = false ]; then
72- # Build a new kicbase image
73- CIBUILD=yes make push-kic-base-image | tee kic-logs.txt
74-
75- # Abort with error message if above command failed
76- ec=$?
77- if [ $ec -gt 0 ]; then
78- if [ " $release " = false ]; then
79- gh pr comment ${ghprbPullId} --body " Hi ${ghprbPullAuthorLoginMention} , building a new kicbase image failed.
80- See the logs at: https://storage.cloud.google.com/minikube-builds/logs/${ghprbPullId} /${ghprbActualCommit:: 7} /kic_image_build.txt
81- "
82- fi
83- exit $ec
84- fi
85- else
86- # Install crane, it does exactly what we want it to do
87- go install github.com/google/go-containerregistry/cmd/crane@latest
88-
89- CURRENT_GCR_REPO=$( grep " gcrRepo =" pkg/drivers/kic/types.go | cut -d \" -f 2)
90- CURRENT_DH_REPO=$( grep " dockerhubRepo =" pkg/drivers/kic/types.go | cut -d \" -f 2)
91-
92- CURRENT_GCR_IMG=$CURRENT_GCR_REPO :$CURRENT_KIC_VERSION
93- CURRENT_DH_IMG=$CURRENT_DH_REPO :$CURRENT_KIC_VERSION
94-
95- crane copy $CURRENT_GCR_IMG $GCR_IMG
96- crane copy $CURRENT_DH_IMG $DH_IMG
70+ # Build a new kicbase image
71+ CIBUILD=yes make push-kic-base-image | tee kic-logs.txt
9772
73+ # Abort with error message if above command failed
74+ ec=$?
75+ if [ $ec -gt 0 ]; then
76+ if [ " $release " = false ]; then
77+ gh pr comment ${ghprbPullId} --body " Hi ${ghprbPullAuthorLoginMention} , building a new kicbase image failed.
78+ See the logs at: https://storage.cloud.google.com/minikube-builds/logs/${ghprbPullId} /${ghprbActualCommit:: 7} /kic_image_build.txt
79+ "
80+ fi
81+ exit $ec
9882fi
9983
10084# Retrieve the sha from the new image
0 commit comments