-
Notifications
You must be signed in to change notification settings - Fork 76
ci-automation: Don't skip nightly build when the previous one failed #509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I found a duplicate function and verified that it's the only one via comm -12 <(sort ci-automation/ci_automation_common.sh) <(sort sdk_lib/sdk_container_common.sh) | grep function I'm not sure if this is due to a case where we only import one but can't import the other, hence I'm not deleting it now.
81e859b to
8b8c4fb
Compare
krnowak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an outdated comment, but otherwise looks good. Thanks for looking into this issue and fixing it.
Currently we skip the nightly build if there are no changes. This didn't work well because a new run doesn't fix any failure because the rerun became a no-op. Check if the main artifacts we expect from a step are found, as simple heuristic on whether a rerun is needed.
8b8c4fb to
bca6e6e
Compare
ci-automation: Don't skip nightly build when the previous one failed
ci-automation: Don't skip nightly build when the previous one failed
ci-automation: Don't skip nightly build when the previous one failed
ci-automation: Don't skip nightly build when the previous one failed
ci-automation: Don't skip nightly build when the previous one failed
| touch ./skip-build | ||
| echo "Creating ./skip-build flag file, indicating that the build must not to continue because no new tag got created as there are no changes since tag ${existing_tag}" >&2 | ||
| return 0 | ||
| if curl --head --fail --silent --show-error --location "https://${BUILDCACHE_SERVER}/images/amd64/${FLATCAR_VERSION}/flatcar_production_image.bin.bz2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if curl --head --fail --silent --show-error --location "https://${BUILDCACHE_SERVER}/images/amd64/${FLATCAR_VERSION}/flatcar_production_image.bin.bz2" | |
| if curl --head --fail --silent --show-error --location "https://${BUILDCACHE_SERVER}/images/amd64/${FLATCAR_VERSION}/flatcar_production_image.bin.bz2" \ |
Otherwise it fails as currently:
17:20:48 jenkins/systemd-run-wrap.sh: ci-automation/packages-tag.sh: line 102: syntax error near unexpected token `&&'
17:20:48 jenkins/systemd-run-wrap.sh: ci-automation/packages-tag.sh: line 102: ` && curl --head --fail --silent --show-error --location "[https://${BUILDCACHE_SERVER}/images/arm64/${FLATCAR_VERSION}/flatcar_production_image.bin.bz2](https://${buildcache_server}/images/arm64/$%7BFLATCAR_VERSION%7D/flatcar_production_image.bin.bz2)"; then'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just seen the fixing commit. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lesson learnt: run shellcheck all the time^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be we could add a simple github actions running shellcheck on PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shellcheck -x --severity=warning is still a bit noisy until we fix the warnings, just =error isn't very helpful on the other hand.
Currently we skip the nightly build if there are no changes. This
didn't work well because a new run doesn't fix any failure because the
rerun became a no-op.
Check if the main artifacts we expect from a step are found, as simple
heuristic on whether a rerun is needed.
How to use
backport
Testing done
None