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

ci: Add Jenkins pipeline #1899

Closed
wants to merge 1 commit into from
Closed

ci: Add Jenkins pipeline #1899

wants to merge 1 commit into from

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Sep 6, 2019

This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:

  • checks commit for unintended submodule bumps
  • checks the minimum Rust version
  • builds RPMs
  • builds FCOS (with the new RPMs both for executing the build
    itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

@jlebon
Copy link
Member Author

jlebon commented Sep 6, 2019

Split out the prep patches in #1900!

@jlebon
Copy link
Member Author

jlebon commented Sep 6, 2019

Hmm, OK it's hitting permissions issues:

Not permitted to query list of collaborators, assuming none

Which I'm not sure why. I made it an admin and the token should have the proper scopes. Will have to debug next week.

@jlebon
Copy link
Member Author

jlebon commented Sep 9, 2019

✔️ continuous-integration/jenkins/pr-merge — This commit looks good

Woohoo!

@jlebon jlebon marked this pull request as ready for review September 10, 2019 13:14
@cgwalters
Copy link
Member

cgwalters commented Sep 10, 2019

Let's use registry.svc.ci.openshift.org/coreos/cosa-buildroot:latest ?

@cgwalters
Copy link
Member

(I just created the coreos project there and will soon ensure other people have access to it)

.cci.jenkinsfile Outdated
}
},
codestyle: {
coreos.pod(image: 'registry.fedoraproject.org/fedora:30', privileged: true) {
Copy link
Member

Choose a reason for hiding this comment

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

Does not need privileged

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, can probably use e.g. coreos-assembler for this one. It just needs git.

.cci.jenkinsfile Outdated
}
},
msrv: {
coreos.pod(image: 'registry.fedoraproject.org/fedora:30', privileged: true) {
Copy link
Member

Choose a reason for hiding this comment

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

Does not need privileged

Copy link
Member Author

Choose a reason for hiding this comment

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

We do a full rpm-ostree build here too though, so we need to install packages... privileged: true here translates to runAsUser: 0.

We could use cosa-buildroot:latest, but then dependency changes would have to be done in two separate PRs, right? Which I guess isn't a big deal, though it'd be nice to keep with the atomic changes theme.

Copy link
Member

Choose a reason for hiding this comment

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

privileged: true here translates to runAsUser: 0.

Oh. So in this article - I made an argument that we shouldn't call the default docker/podman model where containers run as uid 0 "privileged".

Let's literally call the option runAsUser: 0 ?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, WFM! Changed to runAsUser: 0. ⬇️

Copy link
Member Author

Choose a reason for hiding this comment

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

We could use cosa-buildroot:latest, but then dependency changes would have to be done in two separate PRs, right?

Another approach here is to use cosa-buildroot:latest, but still run installdeps.sh. That way, the majority of deps are no-ops, but it still closes the gap to keep changes atomic.

Copy link
Member

Choose a reason for hiding this comment

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

SGTM

Copy link
Member Author

Choose a reason for hiding this comment

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

Done! ⬇️

.cci.jenkinsfile Outdated

stage("Test") {
parallel vmcheck: {
coreos.pod(image: 'quay.io/coreos-assembler/coreos-assembler:latest', privileged: true, kvm: true) {
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need privileged instead of just kvm?

Copy link
Member Author

Choose a reason for hiding this comment

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

Implementation TBD, though I think we could get away with just kvm. I commented out the whole section for now.

}
}

stage("Test") {
Copy link
Member

Choose a reason for hiding this comment

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

This is a no-op right now right? Maybe best to comment out the whole section?

cd packaging
make -f Makefile.dist-packaging rpm
"""
stash includes: 'packaging/**/*.rpm', name: 'rpms'
Copy link
Member

Choose a reason for hiding this comment

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

This is an interesting approach. Worth contrasting with e.g. #1893 where what I was trying to do was get closer to a model where we build a derived container. You could imagine e.g. that we generate a FROM coreos-assembler container and then test that potentially multiple ways.

That said, we need RPMs for composes, so I'm OK with this approach too.

Copy link
Member Author

@jlebon jlebon Sep 12, 2019

Choose a reason for hiding this comment

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

Hmm, I think if we want to drop privs even more, we'll need a mix of the two. E.g. an initial derived container build which builds the RPMs and installs them on top of cosa-buildroot:latest, and then using that as part of Jenkins pipeline. I'm not sure if there's an easy way to do this though. We could use the OpenShift Jenkins pipeline plugin and use the openshiftBuild() step, though that'd require creating a buildconfig first, which really wants e.g. a throwaway namespace like Prow gives us.

Or we could mix Prow and Jenkins. E.g. have the pipeline wait until the Prow build is done? Prow can natively trigger Jenkins jobs, though I'm not sure if we'd still be able to leverage the native integration into GitHub like we do now.

Edit: this isn't a direct reply to your specific comment here really, just some brainstorming.

@jlebon
Copy link
Member Author

jlebon commented Sep 12, 2019

Updated! ⬆️

@jlebon jlebon force-pushed the jenkins branch 2 times, most recently from 9c1709c to e80e058 Compare September 13, 2019 13:15
@cgwalters
Copy link
Member

bot, retest this pelase

@jlebon
Copy link
Member Author

jlebon commented Sep 13, 2019

bot, retest this please

1 similar comment
@jlebon
Copy link
Member Author

jlebon commented Sep 13, 2019

bot, retest this please

This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131
@cgwalters
Copy link
Member

@rh-atomic-bot r+ 9b9b2ed

@rh-atomic-bot
Copy link

⌛ Testing commit 9b9b2ed with merge d24bdb6...

rh-atomic-bot pushed a commit that referenced this pull request Sep 13, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
@rh-atomic-bot
Copy link

💔 Test failed - status-papr

@jlebon
Copy link
Member Author

jlebon commented Sep 13, 2019

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit 9b9b2ed with merge 74e93af...

rh-atomic-bot pushed a commit that referenced this pull request Sep 13, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
@rh-atomic-bot
Copy link

💔 Test failed - status-papr

@cgwalters
Copy link
Member

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit 9b9b2ed with merge 830e974...

rh-atomic-bot pushed a commit that referenced this pull request Sep 15, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
@rh-atomic-bot
Copy link

☀️ Test successful - status-papr
Approved by: cgwalters
Pushing 830e974 to master...

@cgwalters
Copy link
Member

Pushing 830e974 to master...

Hmm, looks like rh-atomic-bot lost permissions with the move? Looking

@cgwalters
Copy link
Member

Or alternatively...let's stop using Homu now?

@jlebon
Copy link
Member Author

jlebon commented Sep 16, 2019

I think it was just missing from the branch protection whitelist. I added it now. Let's confirm that:
@rh-atomic-bot retry

Or alternatively...let's stop using Homu now?

Yup, WFM too. (Will be sad to see it go, though I suppose we must move with the times.)

@rh-atomic-bot
Copy link

⌛ Testing commit 9b9b2ed with merge 357ccfc...

rh-atomic-bot pushed a commit that referenced this pull request Sep 16, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
@jlebon
Copy link
Member Author

jlebon commented Sep 16, 2019

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit 9b9b2ed with merge c6bcbf9...

rh-atomic-bot pushed a commit that referenced this pull request Sep 16, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
@jlebon
Copy link
Member Author

jlebon commented Sep 16, 2019

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit 9b9b2ed with merge 727d4b6...

rh-atomic-bot pushed a commit that referenced this pull request Sep 16, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
@rh-atomic-bot
Copy link

💥 Test timed out

@jlebon
Copy link
Member Author

jlebon commented Sep 17, 2019

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit 9b9b2ed with merge ce396fd...

rh-atomic-bot pushed a commit that referenced this pull request Sep 17, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
@rh-atomic-bot
Copy link

💔 Test failed - status-papr

@jlebon
Copy link
Member Author

jlebon commented Sep 17, 2019

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit 9b9b2ed with merge 7480da2...

rh-atomic-bot pushed a commit that referenced this pull request Sep 17, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
@rh-atomic-bot
Copy link

💥 Test timed out

@jlebon
Copy link
Member Author

jlebon commented Sep 18, 2019

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit 9b9b2ed with merge 46ab7d1...

@rh-atomic-bot
Copy link

☀️ Test successful - status-papr
Approved by: cgwalters
Pushing 46ab7d1 to master...

@jlebon jlebon deleted the jenkins branch April 23, 2023 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants