Skip to content

Commit 9bd57f2

Browse files
authored
Merge pull request #921 from dustymabe/dusty-use-osbuild
Add support for using OSBuild
2 parents e45c0ad + ebbc892 commit 9bd57f2

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

docs/config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ streams:
9797
skip_govcloud_hack: true
9898
# OPTIONAL/TEMPORARY: don't upload images to clouds
9999
skip_cloud_uploads: true
100+
# Use newly added support for building images using OSBuild
101+
use_osbuild: true
100102

101103
# REQUIRED: architectures to build for other than x86_64
102104
additional_arches: [aarch64, ppc64le, s390x]

jobs/build-arch.Jenkinsfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ def stream_info = pipecfg.streams[params.STREAM]
7676

7777
def cosa_controller_img = stream_info.cosa_controller_img_hack ?: cosa_img
7878

79+
// Determine if we should use osbuild for image building
80+
def use_osbuild = pipeutils.get_use_osbuild_for_stream(pipecfg, params.STREAM)
81+
7982
// If we are a mechanical stream then we can pin packages but we
8083
// don't maintain complete lockfiles so we can't build in strict mode.
8184
def strict_build_param = stream_info.type == "mechanical" ? "" : "--strict"
@@ -282,7 +285,7 @@ lock(resource: "build-${params.STREAM}-${basearch}") {
282285

283286
// Build QEMU image
284287
stage("Build QEMU") {
285-
shwrap("cosa buildextend-qemu")
288+
shwrap("cosa shell -- env COSA_USE_OSBUILD=${use_osbuild} cosa buildextend-qemu")
286289
}
287290

288291
// This is a temporary hack to help debug https://github.com/coreos/fedora-coreos-tracker/issues/1108.

jobs/build.Jenkinsfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ if (params.ADDITIONAL_ARCHES != "none") {
8383

8484
def stream_info = pipecfg.streams[params.STREAM]
8585

86+
// Determine if we should use osbuild for image building
87+
def use_osbuild = pipeutils.get_use_osbuild_for_stream(pipecfg, params.STREAM)
88+
8689
// If we are a mechanical stream then we can pin packages but we
8790
// don't maintain complete lockfiles so we can't build in strict mode.
8891
def strict_build_param = stream_info.type == "mechanical" ? "" : "--strict"
@@ -344,7 +347,7 @@ lock(resource: "build-${params.STREAM}") {
344347

345348
// Build QEMU image
346349
stage("Build QEMU") {
347-
shwrap("cosa buildextend-qemu")
350+
shwrap("cosa shell -- env COSA_USE_OSBUILD=${use_osbuild} cosa buildextend-qemu")
348351
}
349352

350353
// This is a temporary hack to help debug https://github.com/coreos/fedora-coreos-tracker/issues/1108.

jobs/bump-lockfile.Jenkinsfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ def s3_stream_dir = pipeutils.get_s3_streams_dir(pipecfg, params.STREAM)
4545

4646
def stream_info = pipecfg.streams[params.STREAM]
4747

48+
// Determine if we should use osbuild for image building
49+
def use_osbuild = pipeutils.get_use_osbuild_for_stream(pipecfg, params.STREAM)
50+
4851
def getLockfileInfo(lockfile) {
4952
def pkgChecksum, pkgTimestamp
5053
if (utils.pathExists(lockfile)) {
@@ -209,7 +212,7 @@ lock(resource: "bump-lockfile") {
209212
shwrap("cosa fetch --strict")
210213
}
211214
stage("${arch}:Build") {
212-
shwrap("cosa build --force --strict")
215+
shwrap("cosa shell -- env COSA_USE_OSBUILD=${use_osbuild} cosa build --force --strict")
213216
}
214217
def n = ncpus - 1 // remove 1 for upgrade test
215218
kola(cosaDir: env.WORKSPACE, parallel: n, arch: arch,

utils.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ def get_source_config_ref_for_stream(pipecfg, stream) {
123123
}
124124
}
125125

126+
def get_use_osbuild_for_stream(pipecfg, stream) {
127+
return pipecfg.streams[stream].use_osbuild ? '1' : ''
128+
}
126129

127130
// Parse and handle the result of Kola
128131
boolean checkKolaSuccess(file) {

0 commit comments

Comments
 (0)