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
55bfc885
Commit
55bfc885
authored
Aug 25, 2016
by
David McMahon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the creation of the jobResultsCache.json file.
parent
a953eb42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
upload-to-gcs.sh
hack/jenkins/upload-to-gcs.sh
+6
-6
No files found.
hack/jenkins/upload-to-gcs.sh
View file @
55bfc885
...
...
@@ -156,23 +156,23 @@ function update_job_result_cache() {
for
upload_attempt
in
$(
seq
3
)
;
do
echo
"Copying
${
job_results
}
to
${
tmp_results
}
(attempt
${
upload_attempt
}
)"
# The sed construct below is stripping out only the "version" lines
# and then ensuring there's a single comma at the end of the line.
gsutil
-q
cat
${
job_results
}
2>&- |
\
sed
-n
's/^\({"version".*}\),*/\1,/p'
>>
${
tmp_results
}
||
continue
sed
-n
's/^\({"version".*}\),*/\1,/p'
|
\
tail
-
${
cache_size
}
>>
${
tmp_results
}
||
continue
break
done
echo
"{
\"
version
\"
:
\"
${
version
}
\"
,
\"
buildnumber
\"
:
\"
${
BUILD_NUMBER
}
\"
,"
\
"
\"
result
\"
:
\"
${
build_result
}
\"
}"
>>
${
tmp_results
}
# JSON doesn't like terminating elements to contain a "," separator, so
# terminate the elements with an empty one.
echo
-e
"{}
\n
]"
>>
${
tmp_results
}
echo
"]"
>>
${
tmp_results
}
for
upload_attempt
in
$(
seq
3
)
;
do
echo
"Copying
${
tmp_results
}
to
${
job_results
}
(attempt
${
upload_attempt
}
)"
gsutil
-q
-h
"Content-Type:application/json"
cp
-a
"
${
gcs_acl
}
"
\
<
(
tail
-
${
cache_size
}
${
tmp_results
}
)
${
job_results
}
||
continue
${
tmp_results
}
${
job_results
}
||
continue
break
done
...
...
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