ci: revert removing coreos-ci Jenkins CI job
authorJoseph Marrero Corchado <jmarrero@redhat.com>
Thu, 2 Jul 2026 15:02:57 +0000 (11:02 -0400)
committerJoseph Marrero Corchado <jmarrero@redhat.com>
Thu, 2 Jul 2026 15:05:41 +0000 (11:05 -0400)
This partially reverts commit 3a4ced5c97bee5196f33feea6c685e191e129acf.

Restore .cci.jenkinsfile — the coreos-ci Jenkins pipeline is still in
use and should not have been removed.

.cci.jenkinsfile [new file with mode: 0644]

diff --git a/.cci.jenkinsfile b/.cci.jenkinsfile
new file mode 100644 (file)
index 0000000..6804e52
--- /dev/null
@@ -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
+        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.*")
+}