Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .cci.jenkinsfile
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'
Comment on lines +30 to +31

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The make check command is executed with -C target/c, which means the test-suite.log file is generated inside the target/c/ directory (i.e., target/c/test-suite.log).

Currently, the finally block attempts to cat and archive test-suite.log from 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.log ensures that the test results are correctly captured and archived.

            shwrap("cat target/c/test-suite.log || true")
            archiveArtifacts allowEmptyArchive: true, artifacts: 'target/c/test-suite.log'

Copy link
Copy Markdown
Member Author

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.

}
}
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
Comment thread
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.*")
}
5 changes: 2 additions & 3 deletions src/ostree/ot-admin-instutil-builtin-set-kargs.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ ot_admin_instutil_builtin_set_kargs (int argc, char **argv, OstreeCommandInvocat
context = g_option_context_new ("ARGS");

if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER
| OSTREE_ADMIN_BUILTIN_FLAG_UNLOCKED,
invocation, &sysroot, cancellable, error))
OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER, invocation, &sysroot,
cancellable, error))
goto out;

deployments = ostree_sysroot_get_deployments (sysroot);
Expand Down
Loading