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
8d11137e
Commit
8d11137e
authored
Aug 03, 2015
by
Alex Mohr
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12177 from ixdy/retry-gsutil-upload
Retry uploading/publishing CI builds to work around gsutil bug
parents
9df26f27
1289165a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
common.sh
build/common.sh
+3
-0
push-ci-build.sh
build/push-ci-build.sh
+9
-2
No files found.
build/common.sh
View file @
8d11137e
...
@@ -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,6 +909,7 @@ function kube::release::gcs::copy_release_artifacts() {
...
@@ -908,6 +909,7 @@ 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."
[[
${
KUBE_GCS_DELETE_EXISTING
}
=
~ ^[yY]
$
]]
||
{
read
-p
"Delete everything under
${
gcs_destination
}
? [y/n] "
-r
||
{
read
-p
"Delete everything under
${
gcs_destination
}
? [y/n] "
-r
||
{
echo
"EOF on prompt. Skipping upload"
echo
"EOF on prompt. Skipping upload"
return
return
...
@@ -916,6 +918,7 @@ function kube::release::gcs::copy_release_artifacts() {
...
@@ -916,6 +918,7 @@ function kube::release::gcs::copy_release_artifacts() {
echo
"Skipping upload"
echo
"Skipping upload"
return
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 @
8d11137e
...
@@ -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"
...
@@ -32,5 +33,11 @@ KUBE_GCS_LATEST_CONTENTS=${LATEST}
...
@@ -32,5 +33,11 @@ KUBE_GCS_LATEST_CONTENTS=${LATEST}
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
source
"
$KUBE_ROOT
/build/common.sh"
source
"
$KUBE_ROOT
/build/common.sh"
kube::release::gcs::release
MAX_ATTEMPTS
=
3
kube::release::gcs::publish_latest
attempt
=
0
while
[[
${
attempt
}
-lt
${
MAX_ATTEMPTS
}
]]
;
do
kube::release::gcs::release
&&
kube::release::gcs::publish_latest
&&
break
||
true
attempt
=
$((
attempt
+
1
))
sleep
5
done
[[
${
attempt
}
-lt
${
MAX_ATTEMPTS
}
]]
||
exit
1
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