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
a1d9724b
Commit
a1d9724b
authored
Dec 09, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18194 from ixdy/upload-to-gcs-script
Auto commit by PR queue bot
parents
8d633458
7151b54a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
upload-to-gcs.sh
hack/jenkins/upload-to-gcs.sh
+2
-2
No files found.
hack/jenkins/upload-to-gcs.sh
View file @
a1d9724b
...
@@ -55,18 +55,18 @@ function upload_logs_to_gcs() {
...
@@ -55,18 +55,18 @@ function upload_logs_to_gcs() {
local
-r
gcs_job_path
=
"
${
JENKINS_GCS_LOGS_PATH
}
/
${
JOB_NAME
}
"
local
-r
gcs_job_path
=
"
${
JENKINS_GCS_LOGS_PATH
}
/
${
JOB_NAME
}
"
local
-r
gcs_build_path
=
"
${
gcs_job_path
}
/
${
BUILD_NUMBER
}
"
local
-r
gcs_build_path
=
"
${
gcs_job_path
}
/
${
BUILD_NUMBER
}
"
local
-r
gcs_acl
=
"public-read"
local
-r
gcs_acl
=
"public-read"
local
-r
console_log
=
"
${
JENKINS_HOME
}
/jobs/
${
JOB_NAME
}
/builds/
${
BUILD_NUMBER
}
/log"
local
-r
filtered_console_log
=
"
${
WORKSPACE
}
/console-log.txt"
for
upload_attempt
in
$(
seq
3
)
;
do
for
upload_attempt
in
$(
seq
3
)
;
do
echo
"Uploading to
${
gcs_build_path
}
(attempt
${
upload_attempt
}
)"
echo
"Uploading to
${
gcs_build_path
}
(attempt
${
upload_attempt
}
)"
if
[[
-d
"
${
artifacts_path
}
"
&&
-n
$(
ls
-A
"
${
artifacts_path
}
"
)
]]
;
then
if
[[
-d
"
${
artifacts_path
}
"
&&
-n
$(
ls
-A
"
${
artifacts_path
}
"
)
]]
;
then
gsutil
-m
-q
-o
"GSUtil:use_magicfile=True"
cp
-a
"
${
gcs_acl
}
"
-r
-c
\
gsutil
-m
-q
-o
"GSUtil:use_magicfile=True"
cp
-a
"
${
gcs_acl
}
"
-r
-c
\
-z
log,txt,xml
"
${
artifacts_path
}
"
"
${
gcs_build_path
}
/artifacts"
||
continue
-z
log,txt,xml
"
${
artifacts_path
}
"
"
${
gcs_build_path
}
/artifacts"
||
continue
fi
fi
local
-r
console_log
=
"
${
JENKINS_HOME
}
/jobs/
${
JOB_NAME
}
/builds/
${
BUILD_NUMBER
}
/log"
# The console log only exists on the Jenkins master, so don't fail if it
# The console log only exists on the Jenkins master, so don't fail if it
# doesn't exist.
# doesn't exist.
if
[[
-f
"
${
console_log
}
"
]]
;
then
if
[[
-f
"
${
console_log
}
"
]]
;
then
# Remove ANSI escape sequences from the console log before uploading.
# Remove ANSI escape sequences from the console log before uploading.
local
-r
filtered_console_log
=
"
${
WORKSPACE
}
/console-log.txt"
sed
-r
"s/
\x
1B
\[
([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"
\
sed
-r
"s/
\x
1B
\[
([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"
\
"
${
console_log
}
"
>
"
${
filtered_console_log
}
"
"
${
console_log
}
"
>
"
${
filtered_console_log
}
"
gsutil
-q
cp
-a
"
${
gcs_acl
}
"
-z
txt
"
${
filtered_console_log
}
"
"
${
gcs_build_path
}
/"
||
continue
gsutil
-q
cp
-a
"
${
gcs_acl
}
"
-z
txt
"
${
filtered_console_log
}
"
"
${
gcs_build_path
}
/"
||
continue
...
...
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