-
Notifications
You must be signed in to change notification settings - Fork 34
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
jobs-builder: add PR jobs for Fedora 35 #419
Conversation
@jodh-intel @fidencio this is a continuation of #406. I'm adding jobs for Fedora 35 but the most important thing are the two added templates which can be used to generate PR and baseline jobs. With this merged I expect that migrating the jobs ( #407) to be straightforward. @GabyCT @devimc mind to review this PR? I basically copied the properties and configuration of the existing Ubuntu jobs (either PR and baseline). The only change that I made (and I am not so sure) is the use of the I already published two jobs on our Jenkins just for the sake of testing. You can have a look how they will end up generated: |
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.
thanks @wainersm - I've left some comments
|
||
curl -OL https://raw.githubusercontent.com/kata-containers/tests/main/.ci/ci_entry_point.sh | ||
export DEBUG=true | ||
export CI_JOB="{ci_job}" |
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.
missing $
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.
@devimc thanks for reviewing it! The Jenkins Job Builder will interpret a value enclosed in curly brackets as a template variable. Example, suppose I set ci_jo: foobar
somewhere on the yaml file, that will result on the line export CI_JOB="{ci_job}"
.
If you don't want it to interpret the value as a template variable then you can scape (use double curly brackets). That answers your next comment; ${{GOPATH}}
becomes ${GOPATH}
.
|
||
export GOPATH=$WORKSPACE/go | ||
export GOROOT="/usr/local/go" | ||
export PATH="${{GOPATH}}/bin:/usr/local/go/bin:/usr/sbin:/usr/local/bin:${{PATH}}" |
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.
why double {
here and only one {
in the following line ?
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.
{l}-{g}-{t}-{m}{ }{!} { :-) }
<= Not a fork bomb, honest! ;)
Hehehehhe thanks for reviewing @jodh-intel ! |
This created the backbone to generate pull request and baseline jobs with Jenkins Job Builder. Currently the yaml files are configured to generate PR and baseline jobs for Fedora 35. The following new jobs will be generated: kata-containers-fedora-35-x86_64-CRIO_K8S-PR kata-containers-fedora-35-x86_64-CRIO_K8S_MINIMAL-PR kata-containers-main-fedora-35-x86_64-CRIO_K8S-baseline kata-containers-main-fedora-35-x86_64-CRIO_K8S_MINIMAL-baseline tests-fedora-35-x86_64-CRIO_K8S-PR tests-fedora-35-x86_64-CRIO_K8S_MINIMAL-PR Fixes kata-containers#389 Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
ba708d2
to
c546de5
Compare
Updates to this PR:
@jodh-intel @GabyCT maybe don't need to approve again. |
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.
Thanks @wainersm. A few nits but overall,
lgtm
set -e | ||
set -x |
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.
Nit: Might be worth adding the usual header:
set -o errexit
set -o nounset
set -o pipefail
[ -n "$BASH_VERSION" ] && set -o errtrace
[ -n "${DEBUG:-}" ] && set -o xtrace
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.
This script is just a thin wrapper to https://raw.githubusercontent.com/kata-containers/tests/main/.ci/ci_entry_point.sh , which in turn adds all those flags :)
- log-text: .* | ||
operator: OR | ||
script: | | ||
#!/bin/bash |
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.
Again, why not add the standard shell header here too?
Random thought: I wonder if we need a .ci/kata_header.sh
to make this easy to source and minimise duplication.
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.
Here is yet another thin wrapper, this time to https://raw.githubusercontent.com/kata-containers/tests/main/.ci/teardown.sh . I just realized that unlike ci_entry_point.sh
, the teardown.sh
script doesn't set those shell properties. Maybe it is by design because we don't want it to fail early? (it collects logs; one or more commands might fail and it is ok?)
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.
Regarding adding the .ci/kata_header.sh
; then people like me will forget to source it :)
- '@snir911' | ||
- '@c3d' |
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.
ooi, are you both in the same TZ? If so, maybe we could add a few more users: I'd say minimum of three, but even better would be to add a single GH team here.
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 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.
What does having a user specified in maintainers
here actually mean though? What if they are both unavailable? Is it simply for mail notification or similar?
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.
I'm not sure I understood your first question. The maintainers
variable is used on the description of the job, so on the Jenkins UI it will be listed the names on the jobs' description. An example here: http://jenkins.katacontainers.io/view/Daily%20baseline/job/kata-containers-main-fedora-35-x86_64-CRIO_K8S-baseline/
The idea is to have their names on the job's description for the case a developer need to speak with the owners (e.g. developer's PR cannot be merged because a job is failing and she/he notices the baseline has failed too). The owners are also listed in a table on the view here. Having their names on the job's description just increase visibility. Do you see any problem with that?
A head's up that may affect your PR. In the Architecture Committee meeting from January 25th, 2022, the Architecture Committee has agreed on using the "Dismiss stale pull request approvals when new commits are pushed" configuration from GitHub. It basically means that if your PR has been rebased or updated, the approvals given will be erased. In order to minimize traumas due to the new approach, please, consider adding a note on the changes done before the rebase / force-push, and also pinging the reviewers for a subsequent round of reviews. Thanks for your understanding! Related issue: kata-containers/community#249 |
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.
LGTM, thanks!
(for the record, as discussed with @wainersm) We just need to make sure it indeed override/replace the f35 jobs i created manually, and also once we see everything works as expected, remove the f32 jobs
adding do-not-merge until Wainer's ack to merge |
@jodh-intel can I have you ack? |
I just renamed the Fedora 35 @snir911 created manually so on publishing they will be overwritten (and we keep the historic of executions). |
This created the backbone to generate pull request and baseline jobs
with Jenkins Job Builder. Currently the yaml files are configured to
generate PR and baseline jobs for Fedora 35.
The following new jobs will be generated:
kata-containers-fedora-35-x86_64-CRIO_K8S-PR
kata-containers-fedora-35-x86_64-CRIO_K8S_MINIMAL-PR
kata-containers-main-fedora-35-x86_64-CRIO_K8S-baseline
kata-containers-main-fedora-35-x86_64-CRIO_K8S_MINIMAL-baseline
tests-fedora-35-x86_64-CRIO_K8S-PR
tests-fedora-35-x86_64-CRIO_K8S_MINIMAL-PR
Fixes #389
Signed-off-by: Wainer dos Santos Moschetta [email protected]