Skip to content
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

Merged
merged 1 commit into from
Feb 1, 2022

Conversation

wainersm
Copy link
Contributor

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 wainersm@redhat.com

@wainersm
Copy link
Contributor Author

@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 ci_entry_point.sh script on both baseline and PR jobs, but I've seen that script being used only on baselines. Does it work fine with PR jobs too?

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:
http://jenkins.katacontainers.io/job/kata-containers-main-fedora-35-x86_64-CRIO_K8S-baseline
http://jenkins.katacontainers.io/job/tests-fedora-35-x86_64-CRIO_K8S-PR/

GabyCT
GabyCT previously approved these changes Jan 24, 2022
Copy link

@devimc devimc left a 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

jobs-builder/jobs/include/ci_entrypoint.sh.inc Outdated Show resolved Hide resolved

curl -OL https://raw.githubusercontent.com/kata-containers/tests/main/.ci/ci_entry_point.sh
export DEBUG=true
export CI_JOB="{ci_job}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing $

Copy link
Contributor Author

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}}"
Copy link

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 ?

jodh-intel
jodh-intel previously approved these changes Jan 25, 2022
Copy link
Contributor

@jodh-intel jodh-intel left a 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! ;)

@wainersm
Copy link
Contributor Author

{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 <wainersm@redhat.com>
@wainersm
Copy link
Contributor Author

Updates to this PR:

  • Moved the shebang to the first line (@devimc)
  • I realized the baseline jobs would be running 3x per day. Changed the timed value to 'H 0 * * *'

@jodh-intel @GabyCT maybe don't need to approve again.

Copy link
Contributor

@jodh-intel jodh-intel left a 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

Comment on lines +10 to +11
set -e
set -x
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor Author

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?)

Copy link
Contributor Author

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 :)

Comment on lines +176 to +177
- '@snir911'
- '@c3d'
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We agreed that baseline jobs should be owners (#403). @snir911 and @c3d are going to be the owners of those Fedora 35 jobs. So it is fine.

Copy link
Contributor

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?

Copy link
Contributor Author

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?

@fidencio
Copy link
Member

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

Copy link
Member

@snir911 snir911 left a 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

@snir911 snir911 added the do-not-merge PR has problems or depends on another label Jan 30, 2022
@snir911
Copy link
Member

snir911 commented Jan 30, 2022

adding do-not-merge until Wainer's ack to merge

@wainersm
Copy link
Contributor Author

@jodh-intel can I have you ack?

@wainersm wainersm removed the do-not-merge PR has problems or depends on another label Feb 1, 2022
@wainersm
Copy link
Contributor Author

wainersm commented Feb 1, 2022

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

I just renamed the Fedora 35 @snir911 created manually so on publishing they will be overwritten (and we keep the historic of executions).

@wainersm wainersm added no-backport-needed Changed do not need to be applied to an older branch / repository no-forward-port-needed Changed do not need to be applied to a newer branch / repository labels Feb 1, 2022
@GabyCT GabyCT merged commit 13e4ddf into kata-containers:main Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport-needed Changed do not need to be applied to an older branch / repository no-forward-port-needed Changed do not need to be applied to a newer branch / repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bump to Fedora 33 (or newer) on CI jobs
6 participants