-
Notifications
You must be signed in to change notification settings - Fork 2
removed GCloud-specific docker registry secret creation #77
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
base: jg/sf-graceful-shutdown
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -26,11 +26,7 @@ echo -n " Delete secret for docker registry " | |||||||||||||
| runCommand "SKIP" "kubectl delete secret dockerregistry -n ${PROJECT_NAME}" | ||||||||||||||
|
|
||||||||||||||
| echo -n " Create new secret for docker registry " | ||||||||||||||
| if [ "${GCLOUD_DEPLOY}" = "true" ]; then | ||||||||||||||
| runCommand "ERROR" "kubectl create secret docker-registry dockerregistry --docker-server=eu.gcr.io --docker-username _json_key --docker-email ${GCLOUD_CONTAINER_REGISTRY_EMAIL} --docker-password='${GCLOUD_CONTAINER_REGISTRY_ACCOUNT}' -n ${PROJECT_NAME}" | ||||||||||||||
| else | ||||||||||||||
| runCommand "ERROR" "kubectl create secret docker-registry dockerregistry --docker-server=${CI_REGISTRY} --docker-username=${DEPLOY_REGISTER_USER} --docker-password=${DEPLOY_REGISTER_PASSWORD} -n ${PROJECT_NAME}" | ||||||||||||||
| fi | ||||||||||||||
| runCommand "ERROR" "kubectl create secret docker-registry dockerregistry --docker-server=${CI_REGISTRY} --docker-username=${DEPLOY_REGISTER_USER} --docker-password=${DEPLOY_REGISTER_PASSWORD} -n ${PROJECT_NAME}" | ||||||||||||||
|
||||||||||||||
| runCommand "ERROR" "kubectl create secret docker-registry dockerregistry --docker-server=${CI_REGISTRY} --docker-username=${DEPLOY_REGISTER_USER} --docker-password=${DEPLOY_REGISTER_PASSWORD} -n ${PROJECT_NAME}" | |
| printf -v ESCAPED_CI_REGISTRY '%q' "${CI_REGISTRY}" | |
| printf -v ESCAPED_DEPLOY_REGISTER_USER '%q' "${DEPLOY_REGISTER_USER}" | |
| printf -v ESCAPED_DEPLOY_REGISTER_PASSWORD '%q' "${DEPLOY_REGISTER_PASSWORD}" | |
| printf -v ESCAPED_PROJECT_NAME '%q' "${PROJECT_NAME}" | |
| runCommand "ERROR" "kubectl create secret docker-registry dockerregistry --docker-server=${ESCAPED_CI_REGISTRY} --docker-username=${ESCAPED_DEPLOY_REGISTER_USER} --docker-password=${ESCAPED_DEPLOY_REGISTER_PASSWORD} -n ${ESCAPED_PROJECT_NAME}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI_REGISTRYis now required for all deployments (the GCloud branch was removed), but it is not validated at the top like the other required env vars. AddassertVariable "CI_REGISTRY"(or otherwise ensure it’s always set) so the script fails early with a clear message rather than runningkubectl ... --docker-server=.