Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
4de373aa
Commit
4de373aa
authored
Feb 18, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #20714 from fgrzadkowski/push_gcr
Auto commit by PR queue bot
parents
eb451549
2c51e037
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
common.sh
build/common.sh
+17
-0
push-official-release.sh
build/push-official-release.sh
+5
-0
No files found.
build/common.sh
View file @
4de373aa
...
...
@@ -1523,6 +1523,10 @@ function kube::release::docker::release() {
docker_push_cmd=("gcloud" "docker")
fi
if [[ "${KUBE_DOCKER_REGISTRY}" == "gcr.io/google_containers" ]]; then
# Activate credentials for the k8s.production.user@gmail.com
gcloud config set account k8s.production.user@gmail.com
fi
for arch in "${archs[@]}"; do
for binary in "${binaries[@]}"; do
local docker_target="${KUBE_DOCKER_REGISTRY}/${binary}-${arch}:${KUBE_DOCKER_IMAGE_TAG}"
...
...
@@ -1540,4 +1544,17 @@ function kube::release::docker::release() {
fi
done
done
if [[ "${KUBE_DOCKER_REGISTRY}" == "gcr.io/google_containers" ]]; then
# Activate default account
gcloud config set account ${USER}@google.com
fi
}
function kube::release::has_gcloud_account() {
local -r account="${1-}"
if [[ -n $(gcloud auth list --filter-account $account 2>/dev/null) ]]; then
return 0
else
return 1
fi
}
build/push-official-release.sh
View file @
4de373aa
...
...
@@ -45,6 +45,11 @@ if "${KUBE_ROOT}/cluster/kubectl.sh" 'version' | grep 'Client' | grep 'dirty'; t
exit
1
fi
if
!
kube::release::has_gcloud_account k8s.production.user@gmail.com
;
then
kube::log::error
"Pushing images to gcr.io/google_containers requires credentials for account k8s.production.user@gmail.com"
return
1
fi
kube::release::parse_and_validate_release_version
"
${
KUBE_RELEASE_VERSION
}
"
kube::release::gcs::release
kube::release::docker::release
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment