mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
Merge pull request #14969 from gmarek/fix-jenkins
Add missing PROJECT flag to Kubemark scripts
This commit is contained in:
commit
14d9788c66
@ -24,7 +24,6 @@ source "${KUBE_ROOT}/cluster/kubemark/util.sh"
|
||||
detect-project &> /dev/null
|
||||
export PROJECT
|
||||
|
||||
|
||||
RUN_FROM_DISTRO=${RUN_FROM_DISTRO:-false}
|
||||
MAKE_DIR="${KUBE_ROOT}/cluster/images/kubemark"
|
||||
|
||||
@ -63,27 +62,28 @@ gcloud compute instances create ${MASTER_NAME} \
|
||||
--scopes "storage-ro,compute-rw,logging-write" \
|
||||
--disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no"
|
||||
|
||||
MASTER_IP=`gcloud compute instances describe hollow-cluster-master --zone=${ZONE} | grep networkIP | cut -f2 -d":" | sed "s/ //g"`
|
||||
MASTER_IP=$(gcloud compute instances describe hollow-cluster-master \
|
||||
--zone="${ZONE}" --project="${PROJECT}" | grep networkIP | cut -f2 -d":" | sed "s/ //g")
|
||||
|
||||
until gcloud compute ssh --zone="${ZONE}" hollow-cluster-master --command="ls" &> /dev/null; do
|
||||
until gcloud compute ssh --zone="${ZONE}" --project="${PROJECT}" hollow-cluster-master --command="ls" &> /dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
if [ "${RUN_FROM_DISTRO}" == "false" ]; then
|
||||
gcloud compute copy-files --zone="${ZONE}" \
|
||||
gcloud compute copy-files --zone="${ZONE}" --project="${PROJECT}" \
|
||||
"${KUBE_ROOT}/_output/release-tars/kubernetes-server-linux-amd64.tar.gz" \
|
||||
"${KUBE_ROOT}/test/kubemark/start-kubemark-master.sh" \
|
||||
"${KUBE_ROOT}/test/kubemark/configure-kubectl.sh" \
|
||||
"hollow-cluster-master":~
|
||||
else
|
||||
gcloud compute copy-files --zone="${ZONE}" \
|
||||
gcloud compute copy-files --zone="${ZONE}" --project="${PROJECT}" \
|
||||
"${KUBE_ROOT}/server/kubernetes-server-linux-amd64.tar.gz" \
|
||||
"${KUBE_ROOT}/test/kubemark/start-kubemark-master.sh" \
|
||||
"${KUBE_ROOT}/test/kubemark/configure-kubectl.sh" \
|
||||
"hollow-cluster-master":~
|
||||
fi
|
||||
|
||||
gcloud compute ssh --zone=${ZONE} hollow-cluster-master \
|
||||
gcloud compute ssh --zone=${ZONE} --project="${PROJECT}" hollow-cluster-master \
|
||||
--command="chmod a+x configure-kubectl.sh && chmod a+x start-kubemark-master.sh && sudo ./start-kubemark-master.sh"
|
||||
|
||||
sed "s/##masterip##/\"${MASTER_IP}\"/g" ${KUBE_ROOT}/test/kubemark/hollow-kubelet_template.json > ${KUBE_ROOT}/test/kubemark/hollow-kubelet.json
|
||||
|
@ -27,7 +27,7 @@ MASTER_NAME="hollow-cluster-master"
|
||||
kubectl delete -f ${KUBE_ROOT}/test/kubemark/hollow-kubelet.json &> /dev/null || true
|
||||
kubectl delete -f ${KUBE_ROOT}/test/kubemark/kubemark-ns.json &> /dev/null || true
|
||||
|
||||
gcloud compute instances delete ${MASTER_NAME} \
|
||||
gcloud compute instances delete "${MASTER_NAME}" \
|
||||
--project "${PROJECT}" \
|
||||
--quiet \
|
||||
--zone "${ZONE}" || true
|
||||
|
Loading…
Reference in New Issue
Block a user