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

[testing] ci: migrate to new directory and method names #2021

Merged
merged 1 commit into from
Oct 17, 2022
Merged
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
18 changes: 9 additions & 9 deletions .cci.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cosaPod {
shwrap("cd config && ci/validate")

shwrap("""
mkdir -p /srv/fcos && cd /srv/fcos
mkdir -p /srv/coreos && cd /srv/coreos
cosa init ${env.WORKSPACE}/config
curl -LO https://raw.githubusercontent.com/coreos/fedora-coreos-releng-automation/main/scripts/download-overrides.py
python3 download-overrides.py
Expand All @@ -20,8 +20,8 @@ cosaPod {
// use a --parent-build arg so we can diff later and it matches prod
def parent_arg = ""
def parent_commit = ""
if (shwrapRc("test -e /srv/fcos/builds/latest/${basearch}/meta.json") == 0) {
shwrap("cp /srv/fcos/builds/latest/${basearch}/meta.json .") // readJSON wants it in the WORKSPACE
if (shwrapRc("test -e /srv/coreos/builds/latest/${basearch}/meta.json") == 0) {
shwrap("cp /srv/coreos/builds/latest/${basearch}/meta.json .") // readJSON wants it in the WORKSPACE
def meta = readJSON file: "meta.json"
def version = meta["buildid"]
parent_arg = "--parent-build ${version}"
Expand All @@ -35,24 +35,24 @@ cosaPod {
if (env.CHANGE_TARGET in mechanical_streams) {
no_strict_build = true
}
fcosBuild(skipInit: true, noStrict: no_strict_build, extraFetchArgs: '--with-cosa-overrides', extraArgs: parent_arg)
cosaBuild(skipInit: true, noStrict: no_strict_build, extraFetchArgs: '--with-cosa-overrides', extraArgs: parent_arg)

parallel metal: {
shwrap("cd /srv/fcos && cosa buildextend-metal")
shwrap("cd /srv/coreos && cosa buildextend-metal")
}, metal4k: {
shwrap("cd /srv/fcos && cosa buildextend-metal4k")
shwrap("cd /srv/coreos && cosa buildextend-metal4k")
}

stage("Test ISO") {
shwrap("cd /srv/fcos && cosa buildextend-live")
fcosKolaTestIso(cosaDir: "/srv/fcos", extraArgs4k: "--no-pxe")
shwrap("cd /srv/coreos && cosa buildextend-live")
kolaTestIso(extraArgs4k: "--no-pxe")
}

// also print the pkgdiff as a separate stage to make it more visible
if (parent_arg != "") {
stage("RPM Diff") {
shwrap("""
cd /srv/fcos
cd /srv/coreos
new_commit=\$(jq -r '.["ostree-commit"]' builds/latest/${basearch}/meta.json)
rpm-ostree db diff --repo tmp/repo ${parent_commit} \${new_commit} | tee tmp/diff.txt
if grep -q Downgraded tmp/diff.txt; then
Expand Down