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
2bc5dd55
Commit
2bc5dd55
authored
Apr 06, 2015
by
Zach Loafman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add kube::util::wait-for-jobs to report status, unlike builtin wait
** Sigh ** Fixes an additional complaint in #6463
parent
1ecb926a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
common.sh
build/common.sh
+4
-4
util.sh
hack/lib/util.sh
+11
-0
No files found.
build/common.sh
View file @
2bc5dd55
...
@@ -508,11 +508,11 @@ function kube::release::package_tarballs() {
...
@@ -508,11 +508,11 @@ function kube::release::package_tarballs() {
kube::release::package_client_tarballs &
kube::release::package_client_tarballs &
kube::release::package_server_tarballs &
kube::release::package_server_tarballs &
kube::release::package_salt_tarball &
kube::release::package_salt_tarball &
wait
||
{
kube::log::error
"previous tarball phase failed"
;
return
1
;
}
kube::util::wait-for-jobs
||
{
kube::log::error
"previous tarball phase failed"
;
return
1
;
}
kube::release::package_full_tarball &
# _full depends on all the previous phases
kube::release::package_full_tarball &
# _full depends on all the previous phases
kube::release::package_test_tarball &
# _test doesn't depend on anything
kube::release::package_test_tarball &
# _test doesn't depend on anything
wait
||
{
kube::log::error
"previous tarball phase failed"
;
return
1
;
}
kube::util::wait-for-jobs
||
{
kube::log::error
"previous tarball phase failed"
;
return
1
;
}
}
}
# Package up all of the cross compiled clients. Over time this should grow into
# Package up all of the cross compiled clients. Over time this should grow into
...
@@ -549,7 +549,7 @@ function kube::release::package_client_tarballs() {
...
@@ -549,7 +549,7 @@ function kube::release::package_client_tarballs() {
done
done
kube::log::status
"Waiting on tarballs"
kube::log::status
"Waiting on tarballs"
wait
||
{
kube::log::error
"client tarball creation failed"
;
exit
1
;
}
kube::util::wait-for-jobs
||
{
kube::log::error
"client tarball creation failed"
;
exit
1
;
}
}
}
# Package up all of the server binaries
# Package up all of the server binaries
...
@@ -619,7 +619,7 @@ function kube::release::create_docker_images_for_server() {
...
@@ -619,7 +619,7 @@ function kube::release::create_docker_images_for_server() {
)
&
)
&
done
done
wait
||
{
kube::log::error
"previous Docker build failed"
;
return
1
;
}
kube::util::wait-for-jobs
||
{
kube::log::error
"previous Docker build failed"
;
return
1
;
}
kube::log::status
"Docker builds done"
kube::log::status
"Docker builds done"
)
)
}
}
...
...
hack/lib/util.sh
View file @
2bc5dd55
...
@@ -95,3 +95,14 @@ kube::util::host_platform() {
...
@@ -95,3 +95,14 @@ kube::util::host_platform() {
esac
esac
echo
"
${
host_os
}
/
${
host_arch
}
"
echo
"
${
host_os
}
/
${
host_arch
}
"
}
}
# Wait for background jobs to finish. Return with
# an error status if any of the jobs failed.
kube::util::wait-for-jobs
()
{
local
fail
=
0
local
job
for
job
in
$(
jobs
-p
)
;
do
wait
"
${
job
}
"
||
fail
=
$((
fail
+
1
))
done
return
${
fail
}
}
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