Changes

Summary

  1. HACKING.md: minor tweaks (details)
  2. jobs: add `test-override` job (details)
  3. jobs: add `bodhi-trigger` job (details)
  4. jobs/test-override: update build description at the end (details)
  5. jobs/bodhi-trigger: wrap testing in cosa pod (details)
  6. jobs/bodhi-trigger: add reporting to ResultsDB (details)
  7. jenkins/config: add JCASC dropin for jms-messaging-plugin (details)
  8. jobs/bodhi-trigger: fix result propagation (details)
  9. ci: add sanity-check for Groovy files (details)
  10. jobs/test-override: on mechanical streams, build on top of known good (details)
  11. jobs/bodhi-trigger: simplify triggering (details)
  12. jobs/bodhi-trigger: fix CI retrigger message handling (details)
  13. jobs/bodhi-trigger: read SRPM list from `bodhi-testing.yaml` (details)
  14. jobs/test-override: resolve Bodhi IDs to Koji IDs early on (details)
  15. bodhi-testing.yaml: support specifying tests to run (details)
  16. README.md: update Jenkins URL (details)
  17. bodhi-testing.yaml: make test patterns more globby (details)
  18. jobs/seed-github-ci: add openshift/os (details)
Commit 334dce13279c67b516e27ed23607518bbec7b750 by Jonathan Lebon
HACKING.md: minor tweaks

We no longer have a cosa imagestream, and the Jenkins BuildConfig is now
called `jenkins-s2i`.

Noticed these while updating CoreOS CI today.
The file was modified HACKING.md (diff)
Commit 3684fb0c4404906af8f76bf198847e326b2bb50b by Jonathan Lebon
jobs: add `test-override` job

This job is similar in structure to `bump-lockfile` (i.e. it runs tests
on multiple arches in parallel), but is geared towards testing Bodhi
and/or Koji overrides. The `OVERRIDES` parameter supports a list of URLs
from those services that the job will automatically download into the
`overrides/rpm` directory when doing the build.

For now, like bump-lockfile, this only does local testing, i.e. QEMU and
testiso scenarios. We could extend this in the future to do some cloud
testing too.

This is prep for having another job that triggers this one based on
Bodhi Fedora messages, but it's structured to be useful on its own too
for ad-hoc testing.
The file was addedjobs/test-override.Jenkinsfile
Commit dae8253346f01d807bc772ac33d51052ced1d6e4 by Jonathan Lebon
jobs: add `bodhi-trigger` job

This job is a step towards better integrating our CI into the rest of
Fedora QA.

The job triggers on Fedora messages from Bodhi whenever an update is
created or edited. It then resolves the Bodhi update to a relevant FCOS
stream, and trigger the `test-override` job with the right parameters.

The implementation details here are a bit messy. Triggering on "a new
Bodhi update" isn't as simple as I would've liked and mapping back to
streams is a bit hairy, but it works!

There's of course a lot of cleanups we could do here (many are marked
in the code), though I'm hoping we can get this in to gain some early
experience and work on cleanups in parallel with the larger task of
adding reporting and socializing it.

See also: https://github.com/coreos/fedora-coreos-tracker/issues/17
The file was addedjobs/bodhi-trigger.Jenkinsfile
Commit 7d4747d29bac135c083e596619cbf3197f0ad9f1 by Jonathan Lebon
jobs/test-override: update build description at the end

It's funny to still have it say 'Running' even when it's done.
The file was modified jobs/test-override.Jenkinsfile (diff)
Commit 999c3d34c96be127fa743b8a40e963e72b37b846 by Jonathan Lebon
jobs/bodhi-trigger: wrap testing in cosa pod

Prep for reporting, which will use code from cosa.
The file was modified jobs/bodhi-trigger.Jenkinsfile (diff)
Commit 5e59cff3c491e86d0aa9aa15eab1f518fe8ee5d7 by Jonathan Lebon
jobs/bodhi-trigger: add reporting to ResultsDB

Call out to the new `resultsdb-report` script in cosa to report test
results back to ResultsDB. Report when first running and then again with
final test results.

Just this alone seems sufficient for the results to show up in Bodhi's
"Automated Tests" tab.

With this, we'll then be able to work on adding policies in Greenwave.
The file was modified HACKING.md (diff)
The file was modified jobs/bodhi-trigger.Jenkinsfile (diff)
Commit 984af45c7dadb43d24ca990d344e0ef7528ac42d by Jonathan Lebon
jenkins/config: add JCASC dropin for jms-messaging-plugin

This configures the JMS messaging plugin to connect to the public
endpoint of the Fedora messaging bus.

The tricky thing is passing in the keystores. The plugin does
not support using Jenkins credentials[[1]] so we can't leverage
kubernetes-credentials-provider.

We could do it the old way, which is to mount the secret into the
Jenkins pod, but since d6d1f61, CoreOS CI now uses the exact same
`jenkins.yaml` manifest as the production pipeline and we don't want to
bind mount it there.

Instead, we hack around this by just baking the keystores in the Jenkins
image at `$JENKINS_HOME/jms-messaging-stores`.

[1]: https://github.com/jenkinsci/jms-messaging-plugin/issues/263
The file was addedjenkins/config/jms.yaml
Commit bc8b4aceebf45f0663d48246fce7d500f0c02c50 by Jonathan Lebon
jobs/bodhi-trigger: fix result propagation

When propagating the result of test-override back to bodhi-trigger, we
were trying to read from the `test` variable where it was out of scope.

Move it within its scope.
The file was modified jobs/bodhi-trigger.Jenkinsfile (diff)
Commit 72e4a6873757bdc855236c24b7e716d185f4635d by Jonathan Lebon
ci: add sanity-check for Groovy files

So at least we got something.

This is copied from fedora-coreos-pipeline. We should probably put that
in coreos-ci-lib.
The file was added.cci.jenkinsfile
Commit 1d353f8fac02a0a7436b09a912a4778a6a0a0189 by Jonathan Lebon
jobs/test-override: on mechanical streams, build on top of known good version

When testing a rawhide update, we should be testing on top of a rawhide
build that we know has worked. Otherwise, the test may fail for any
arbitrary reason. Since rawhide is not locked, we do this by autolocking
on top of the most recent build that contains all the relevant arches.

See also: https://github.com/coreos/fedora-coreos-releng-automation/issues/181
The file was modified jobs/test-override.Jenkinsfile (diff)
Commit 4509014c454f9b257e38106ca4299d88a76fd58a by Jonathan Lebon
jobs/bodhi-trigger: simplify triggering

Now that Bodhi will always send the same message in all situations, we
should be able to simplify this by a lot.

Closes: #53
The file was modified jobs/bodhi-trigger.Jenkinsfile (diff)
Commit 7cd7fe81107b528d5f8a49660d22654a7d95e50c by Jonathan Lebon
jobs/bodhi-trigger: fix CI retrigger message handling

Missed removing this bit from 4509014 ("jobs/bodhi-trigger: simplify
triggering").
The file was modified jobs/bodhi-trigger.Jenkinsfile (diff)
Commit 6c1640cc8b8ddac2630d833a7da56cf26e3c4aa2 by Jonathan Lebon
jobs/bodhi-trigger: read SRPM list from `bodhi-testing.yaml`

Add a new `bodhi-testing.yaml` file containing the list of SRPMs to
test. We'll augment the schema of this file later on to allow e.g.
running only a subset of tests.

This will also in the short-term serve as the source of truth for which
packages are gated on these tests or not. Long-term, we may use this
file slightly differently, though likely the tests to run per component
will still live there (including the default tests to run on any
unlisted component).

While we're here, add a few more core packages to the list.
The file was addedbodhi-testing.yaml
The file was modified jobs/bodhi-trigger.Jenkinsfile (diff)
Commit d213e6a77debb117ad174d29caadd7c518292c3c by Jonathan Lebon
jobs/test-override: resolve Bodhi IDs to Koji IDs early on

It's silly to do this resolution on each builder separately. Let's just
do it once. That also simplifies the downloading loop.
The file was modified jobs/test-override.Jenkinsfile (diff)
Commit 6c1f8691924eb8b8c5f8d41ef670e926a74f7c86 by Jonathan Lebon
bodhi-testing.yaml: support specifying tests to run

For some packages, it's silly to run the full testsuite when they're not
involved or tested at all in e.g. the testiso scenarios.

Let's allow configuring the list of tests to run per SRPM.

This is also prep for being able to run e.g. just `basic` for a much
wider set of packages.
The file was modified jobs/test-override.Jenkinsfile (diff)
The file was modified bodhi-testing.yaml (diff)
The file was modified jobs/bodhi-trigger.Jenkinsfile (diff)
Commit 29647db409f7a9041b46d4b3edf9f451a18ef1ad by Jonathan Lebon
README.md: update Jenkins URL

We forgot to update this when we migrated from CentOS infra to Fedora.
The file was modified README.md (diff)
Commit f9e506e6e7b40bfb4a62a09abb5764beceaf9795 by Jonathan Lebon
bodhi-testing.yaml: make test patterns more globby

The test pattern for `toolbox` was incorrect and so didn't match
anything.

For that component and some others, instead of specifying a full test
path, make the patterns more globby. That makes them more obviously
right, and resistant to the tests moving.

Fixes 6c1f869 ("bodhi-testing.yaml: support specifying tests to run").
The file was modified bodhi-testing.yaml (diff)
Commit b444ff7343732182895ce134f3a59d733e8c8de7 by Jonathan Lebon
jobs/seed-github-ci: add openshift/os

The Prow CI we have in those repos are extremely slow and annoying to
maintain. We're still going to need it for now to at least build RHCOS
with actual RHEL RPMs, but at least for CentOS Stream we should be able
to build that fine in CoreOS CI. (We don't have access to the OCP RPMs,
but with https://github.com/openshift/os/issues/799, we'll move those
out of the base compose anyway.)
The file was modified jobs/seed-github-ci.Jenkinsfile (diff)

Summary

  1. Add `HOME` workaround to other shwrap helpers (details)
  2. kolaTestIso: Update to reflect new kola testiso in coreos-assembler (details)
  3. Set `HOME` at the pod level instead of in shwrap helpers (details)
  4. Add `umask` workaround to other shwrap helpers (details)
  5. Revert "Set `HOME` at the pod level instead of in shwrap helpers" (details)
  6. pod: Enable secret subpath option (details)
  7. kola: add support for allowRerunSuccess (details)
  8. kola: don't use whitespace in --allow-rerun-success option (details)
  9. pod: Allow caller to specify name of pod (details)
  10. kola: refactor and add support for warn: true tests (details)
  11. kola: specify action to runKola helper (details)
  12. kola: use `=` for options with values (details)
  13. checkoutToDir: Recurse submodules (details)
  14. job.yaml: fix apiVersion and other tweaks (details)
  15. buildconfig.json: fix apiVersion (details)
  16. kola/kolaTestIso: use `kola-junit` to publish JUnit test results (details)
  17. pod: support setting env vars in the pod (details)
  18. cosaBuild: add `srcConfig` and `variant` parameters (details)
Commit c1802ee821f967be3bf9319c7a776841b8bd258f by Jonathan Lebon
Add `HOME` workaround to other shwrap helpers

We had it in `shwrap`, but not `shwrapCapture` and `shwrapRc`. We're
hitting an issue right now where `podman` wants to create `$HOME/.ssh`
when using the remote stuff but because we're running unprivileged,
we get

```
Error: failed to connect: ssh: handshake failed: mkdir /.ssh: permission denied
```

We're still trying to determine why this is new, but let's fix the
inconsistency for now.
The file was modified vars/shwrapRc.groovy (diff)
The file was modified vars/shwrapCapture.groovy (diff)
Commit 9cfcec63f86fd9bd04173946c4d5699c4d79f1a4 by Renata Ravanelli
kolaTestIso: Update to reflect new kola testiso in coreos-assembler

- Clean up code to reflect changes done in kola testiso in coreos-assembler

Signed-off-by: Renata Ravanelli <rravanel@redhat.com>
The file was modified vars/kolaTestIso.groovy (diff)
Commit 3577892a9cac46964a5f44be8881a9ef7741df8c by Jonathan Lebon
Set `HOME` at the pod level instead of in shwrap helpers

That way we're sure it's always set.
The file was modified vars/shwrap.groovy (diff)
The file was modified vars/shwrapRc.groovy (diff)
The file was modified vars/pod.groovy (diff)
The file was modified vars/shwrapCapture.groovy (diff)
Commit 33d4910ee476d845611d26b5cfdea094a5a9b875 by Jonathan Lebon
Add `umask` workaround to other shwrap helpers

Didn't hit anything caused by this, but we should be consistent across
all the `shwrap` helpers on principle.
The file was modified vars/shwrapRc.groovy (diff)
The file was modified vars/shwrapCapture.groovy (diff)
Commit 2fcfe477fa966f535f8452bc95b6d92d6ed7c7ed by Jonathan Lebon
Revert "Set `HOME` at the pod level instead of in shwrap helpers"

This reverts commit 3577892a9cac46964a5f44be8881a9ef7741df8c.

Setting the `HOME` var to the workspace from the pod definition doesn't
work because it introduces a chicken-and-egg problem: the workspace
isn't yet allocated since the pod isn't running yet.

This isn't a pure revert since I wanted to keep 33d4910 ("Add `umask`
workaround to other shwrap helpers"), which came after.
The file was modified vars/pod.groovy (diff)
The file was modified vars/shwrap.groovy (diff)
The file was modified vars/shwrapCapture.groovy (diff)
The file was modified vars/shwrapRc.groovy (diff)
Commit 17d0fb26aa5b37ea354362c2b14ac841e661ef73 by Jonathan Lebon
pod: Enable secret subpath option

- Add option for mounting secrets using subpath

Signed-off-by: Renata Ravanelli <rravanel@redhat.com>
The file was modified vars/pod.groovy (diff)
Commit c01f0609761320203c3ae96c83bffee2125b1d40 by Dusty Mabe
kola: add support for allowRerunSuccess

We'll start now to default to passing in --allow-rerun-success tags=needs-internet
so that we can get notified less about intermittent network flakes.

If someone wants to disable this they can pass in allowRerunSuccess=false.

If someone wants to override the tags to use for rerun-success they can
use allowRerunSuccessArgs. For example, allowRerunSuccessArgs="tags=all".

Closes https://github.com/coreos/fedora-coreos-pipeline/issues/842
The file was modified vars/kola.groovy (diff)
Commit a672cc51a616e48e0dca540e91fc13d90a2dd96e by Dusty Mabe
kola: don't use whitespace in --allow-rerun-success option

If we have a whitespace the parsing needle that we have to thread
thread through cmd-kola into `kola run-upgrade` doesn't work right.
We end up with:

```
[dustymabe@media fcos]$ cosa kola --rerun --allow-rerun-success tags=all --upgrades
kola -p qemu-unpriv tags=all --rerun --allow-rerun-success --output-dir tmp/kola-upgrade --qemu-image-dir tmp/kola-qemu-cache -v --find-parent-image
Error: unknown command "tags=all" for "kola"
Run 'kola --help' for usage.
2023-05-05 21:03:38.033149 C | cli: unknown command "tags=all" for "kola"
error: failed to execute cmd-kola: exit status 1
```
The file was modified vars/kola.groovy (diff)
Commit 4591c8e366cfd7a4e413a1b235ca0b7c7d9629e6 by Dusty Mabe
pod: Allow caller to specify name of pod

Allowing the caller to specify the pod name would make it easier to
identify what pods were created for what purpose.

We are planning to use this in the debug pod pipeline job to allow
users to identify which debug pods they own.

Ref: https://github.com/coreos/fedora-coreos-pipeline/issues/803
The file was modified vars/pod.groovy (diff)
Commit 541fc66d3d3631b6969954ade4adb45eed632e8e by Dusty Mabe
kola: refactor and add support for warn: true tests

This commit refactors the arguments and error handling for `kola`
into a runKola closure to make it easier to manage. Most calls in
this file use mostly the same arguments, so this is a nice cleanup.

This commit also adds the `--on-warn-failure-exit-77` option [1]
and adds handling to mark a test as `warn()` if that happens versus
the typical `error()`.

[1] https://github.com/coreos/coreos-assembler/pull/3551
The file was modified vars/kola.groovy (diff)
Commit a17c01ce83404d0008490db8d9ee107925b397a1 by Dusty Mabe
kola: specify action to runKola helper

Right now in the upgrade case we end up with `cosa kola run --upgrades`
and that doesn't quite pass through everything right:

```
+ cosa kola run --rerun --allow-rerun-success=tags=needs-internet --build=39.20230823.92.0 --output-dir=/home/jenkins/agent/workspace/kola-gcp/tmp/kola-UJ7JH/kola-upgrade --on-warn-failure-exit-77 --arch=x86_64 -p=gcp --gcp-json-key=**** --gcp-project=fedora-coreos-testing --upgrades

kola --build 39.20230823.92.0 run --rerun --allow-rerun-success=tags=needs-internet --on-warn-failure-exit-77 --arch=x86_64 -p=gcp --gcp-json-key=**** --gcp-project=fedora-coreos-testing --output-dir /home/jenkins/agent/workspace/kola-gcp/tmp/kola-UJ7JH/kola-upgrade --qemu-image-dir tmp/kola-qemu-cache -v --find-parent-image

Error: unknown flag: --qemu-image-dir
```

We need the ultimate command to be `kola run-upgrade`. Let's add the
action we want as an argument to the runKola helper.
The file was modified vars/kola.groovy (diff)
Commit 950521da1224dfaccdbbc4d37985728d2b091c81 by Dusty Mabe
kola: use `=` for options with values

The way cosa kola parses things and then passes it on to kola is
a mess. Let's remove the spaces so we can make sure the value doesn't
get separated from the option when it's processed.
The file was modified vars/kola.groovy (diff)
Commit 1a7a4ba03d286d146395cb6c5310519a4a04e038 by Jonathan Lebon
checkoutToDir: Recurse submodules

Prep for adding a git submodule to fedora-coreos-config.
The file was modified vars/checkoutToDir.groovy (diff)
Commit badbfa01f34654751f339a83deddb5efa23b6aa9 by Jonathan Lebon
job.yaml: fix apiVersion and other tweaks

The API version for templates is now `template.openshift.io/v1`.
Possibly `v1` was accepted before but not anymore? Fix it.

While we're here, tweak the template name to make it clearer that the
template itself is never created as an object.

Also remove the parameter default value to hard require clients to
always specify it.
The file was modified resources/com/github/coreos/job.yaml (diff)
Commit b7c3eeba0e5caaab0742e0ac590989ffec6ea15a by Jonathan Lebon
buildconfig.json: fix apiVersion

The API version for templates is now `template.openshift.io/v1`.
Possibly `v1` was accepted before but not anymore? Fix it.

Missed doing this as part of badbfa0 ("job.yaml: fix apiVersion and
other tweaks").
The file was modified resources/com/github/coreos/buildconfig.json (diff)
Commit 055567d3967a6f7bcda9e5413b863fd33456b4ef by Jonathan Lebon
kola/kolaTestIso: use `kola-junit` to publish JUnit test results

This will allow us to much more easily inspect failing kola tests.
Goes together with https://github.com/coreos/coreos-assembler/pull/3667,
which has more details.

While we're here, use `kola-testiso` as marker since it looks clearer
and for consistency with `kola-upgrade`.
The file was modified vars/kola.groovy (diff)
The file was modified vars/kolaTestIso.groovy (diff)
Commit 15263ef4e864bed7b2f3f0ac4261923bdf691ce7 by Dusty Mabe
pod: support setting env vars in the pod

We'll set NAME=VALUE for each requested environment variable.

Part of https://github.com/coreos/fedora-coreos-pipeline/issues/939
The file was modified vars/pod.groovy (diff)
Commit 0e60cc4f7332e40843e4163421249b1dec487f7b by Jonathan Lebon
cosaBuild: add `srcConfig` and `variant` parameters

I want to start building CentOS Stream CoreOS in CoreOS CI for at least
openshift/os and coreos/coreos-assembler.

Let's make it easier to point to a different source config than the
default FCOS.
The file was modified vars/cosaBuild.groovy (diff)