-
Notifications
You must be signed in to change notification settings - Fork 358
ci: revert removing coreos-ci Jenkins CI job #3607
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
Open
jmarrero
wants to merge
2
commits into
ostreedev:main
Choose a base branch
from
jmarrero:re-add-jenkins
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+79
−3
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| // Documentation: https://github.com/coreos/coreos-ci/blob/main/README-upstream-ci.md | ||
|
|
||
| properties([ | ||
| // abort previous runs when a PR is updated to save resources | ||
| disableConcurrentBuilds(abortPrevious: true) | ||
| ]) | ||
|
|
||
| stage("Build") { | ||
| def n = 5 | ||
| buildPod(memory: "2Gi", cpu: "${n}") { | ||
| checkout scm | ||
| stage("Static analysis") { | ||
| shwrap("./ci/codestyle.sh") | ||
| } | ||
| stage("Core build") { | ||
| shwrap(""" | ||
| # fetch tags so `git describe` gives a nice NEVRA when building the RPM | ||
| git fetch origin --tags | ||
| git submodule update --init | ||
|
|
||
| env MAKE_JOBS=${n} ./ci/build.sh | ||
| """) | ||
| } | ||
| stage("Unit tests") { | ||
| try { | ||
| shwrap(""" | ||
| make -C target/c check | ||
| """) | ||
| } finally { | ||
| shwrap("cat test-suite.log || true") | ||
| archiveArtifacts allowEmptyArchive: true, artifacts: 'test-suite.log' | ||
| } | ||
| } | ||
| stage("Build installed tests") { | ||
| shwrap(""" | ||
| make -C tests/kolainst | ||
| """) | ||
| } | ||
| stage("Generate artifacts") { | ||
| shwrap(""" | ||
| make -C target/c install DESTDIR=\$(pwd)/installed/rootfs | ||
| make -C tests/kolainst install DESTDIR=\$(pwd)/installed/tests | ||
| bash -c '. /usr/lib/os-release && echo \$VERSION_ID' >\$(pwd)/installed/buildroot-id | ||
| """) | ||
| } | ||
| stash includes: "installed/", name: 'build' | ||
| } | ||
| } | ||
|
|
||
| // Build FCOS and run kola tests. | ||
| // There's some parallelization in testiso up to 8G, add 1G for overhead | ||
| cosaPod(memory: "9Gi", cpu: "4") { | ||
| stage("Build FCOS") { | ||
| checkout scm | ||
| unstash 'build' | ||
| shwrap(""" | ||
| # Make sure none of the files in the unstashed build are setgid | ||
| chmod -c -R g-s installed/ | ||
| # Move the bits into the cosa pod (but only if major versions match) | ||
| buildroot_id=\$(cat installed/buildroot-id) | ||
| osver=\$(. /usr/lib/os-release && echo \$VERSION_ID) | ||
| if test \$osver = \$buildroot_id; then | ||
|
jmarrero marked this conversation as resolved.
|
||
| rsync -rlv installed/rootfs/ / | ||
| fi | ||
| rsync -rlv installed/tests/ / | ||
| coreos-assembler init --force https://github.com/coreos/fedora-coreos-config | ||
| mkdir -p overrides/rootfs | ||
| # And override the on-host bits | ||
| mv installed/rootfs/* overrides/rootfs/ | ||
| rm installed -rf | ||
| coreos-assembler build | ||
| coreos-assembler osbuild qemu metal metal4k live | ||
| """) | ||
| } | ||
| kola(cosaDir: "${env.WORKSPACE}") | ||
| kolaTestIso(cosaDir: "${env.WORKSPACE}", extraArgs: "--denylist-test *.4k.* --denylist-test *.mpath.*") | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The
make checkcommand is executed with-C target/c, which means thetest-suite.logfile is generated inside thetarget/c/directory (i.e.,target/c/test-suite.log).Currently, the
finallyblock attempts tocatand archivetest-suite.logfrom the workspace root, where it does not exist. This prevents the test logs from being displayed or archived when a test fails.Updating the paths to
target/c/test-suite.logensures that the test results are correctly captured and archived.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 file is as it was before the removal.