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
1289165a
Commit
1289165a
authored
Aug 03, 2015
by
Jeff Grafton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add environment variable to delete existing release on GCS
parent
c37c4ed7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
common.sh
build/common.sh
+10
-7
push-ci-build.sh
build/push-ci-build.sh
+1
-0
No files found.
build/common.sh
View file @
1289165a
...
@@ -43,6 +43,7 @@ readonly KUBE_GCS_RELEASE_PREFIX=${KUBE_GCS_RELEASE_PREFIX-devel}/
...
@@ -43,6 +43,7 @@ readonly KUBE_GCS_RELEASE_PREFIX=${KUBE_GCS_RELEASE_PREFIX-devel}/
readonly
KUBE_GCS_DOCKER_REG_PREFIX
=
${
KUBE_GCS_DOCKER_REG_PREFIX
-docker-reg
}
/
readonly
KUBE_GCS_DOCKER_REG_PREFIX
=
${
KUBE_GCS_DOCKER_REG_PREFIX
-docker-reg
}
/
readonly
KUBE_GCS_LATEST_FILE
=
${
KUBE_GCS_LATEST_FILE
:-}
readonly
KUBE_GCS_LATEST_FILE
=
${
KUBE_GCS_LATEST_FILE
:-}
readonly
KUBE_GCS_LATEST_CONTENTS
=
${
KUBE_GCS_LATEST_CONTENTS
:-}
readonly
KUBE_GCS_LATEST_CONTENTS
=
${
KUBE_GCS_LATEST_CONTENTS
:-}
readonly
KUBE_GCS_DELETE_EXISTING
=
"
${
KUBE_GCS_DELETE_EXISTING
:-
n
}
"
# Constants
# Constants
readonly
KUBE_BUILD_IMAGE_REPO
=
kube-build
readonly
KUBE_BUILD_IMAGE_REPO
=
kube-build
...
@@ -908,13 +909,15 @@ function kube::release::gcs::copy_release_artifacts() {
...
@@ -908,13 +909,15 @@ function kube::release::gcs::copy_release_artifacts() {
# First delete all objects at the destination
# First delete all objects at the destination
if
gsutil
ls
"
${
gcs_destination
}
"
>
/dev/null 2>&1
;
then
if
gsutil
ls
"
${
gcs_destination
}
"
>
/dev/null 2>&1
;
then
kube::log::error
"
${
gcs_destination
}
not empty."
kube::log::error
"
${
gcs_destination
}
not empty."
read
-p
"Delete everything under
${
gcs_destination
}
? [y/n] "
-r
||
{
[[
${
KUBE_GCS_DELETE_EXISTING
}
=
~ ^[yY]
$
]]
||
{
echo
"EOF on prompt. Skipping upload"
read
-p
"Delete everything under
${
gcs_destination
}
? [y/n] "
-r
||
{
return
echo
"EOF on prompt. Skipping upload"
}
return
[[
$REPLY
=
~ ^[yY]
$
]]
||
{
}
echo
"Skipping upload"
[[
$REPLY
=
~ ^[yY]
$
]]
||
{
return
echo
"Skipping upload"
return
}
}
}
gsutil
-q
-m
rm
-f
-R
"
${
gcs_destination
}
"
gsutil
-q
-m
rm
-f
-R
"
${
gcs_destination
}
"
fi
fi
...
...
build/push-ci-build.sh
View file @
1289165a
...
@@ -24,6 +24,7 @@ LATEST=$(git describe)
...
@@ -24,6 +24,7 @@ LATEST=$(git describe)
KUBE_GCS_NO_CACHING
=
n
KUBE_GCS_NO_CACHING
=
n
KUBE_GCS_MAKE_PUBLIC
=
y
KUBE_GCS_MAKE_PUBLIC
=
y
KUBE_GCS_UPLOAD_RELEASE
=
y
KUBE_GCS_UPLOAD_RELEASE
=
y
KUBE_GCS_DELETE_EXISTING
=
y
KUBE_GCS_RELEASE_BUCKET
=
kubernetes-release
KUBE_GCS_RELEASE_BUCKET
=
kubernetes-release
KUBE_GCS_RELEASE_PREFIX
=
"ci/
${
LATEST
}
"
KUBE_GCS_RELEASE_PREFIX
=
"ci/
${
LATEST
}
"
KUBE_GCS_LATEST_FILE
=
"ci/latest.txt"
KUBE_GCS_LATEST_FILE
=
"ci/latest.txt"
...
...
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