Skip to content

Commit bd37f0f

Browse files
committed
another attempt to make kojiplugin work within EBC
1 parent 47da4a4 commit bd37f0f

1 file changed

Lines changed: 25 additions & 16 deletions

File tree

testHeadlessComponents.jenkinsfile

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,24 @@ properties([
3939
description: 'Glob for allowed tags (empty = all)'),
4040
string(name: 'KOJI_PACKAGE_ARCH',
4141
defaultValue: 'x86_64,aarch64',
42-
description: 'Comma-separated arch list (empty = all)'),
43-
string(name: 'KOJI_EXCLUDE_NVRS',
42+
description: 'Comma-separated architectures; leave empty for all'),
43+
string(name: 'KOJI_TAG',
44+
defaultValue: 'f*',
45+
description: 'Tag glob; leave empty to match all'),
46+
string(name: 'KOJI_SUBPACKAGE_DENYLIST',
4447
defaultValue: '{*debug*,*src*}',
45-
description: 'Glob set to exclude NVRs (eg. "{*debug*,*src*}")'),
48+
description: 'Subpackage patterns to exclude (glob set or comma-separated)'),
49+
string(name: 'KOJI_SUBPACKAGE_ALLOWLIST',
50+
defaultValue: '',
51+
description: 'Subpackage patterns to allow (optional; empty = all)'),
52+
53+
// --- Download behavior ---
4654
string(name: 'KOJI_DOWNLOAD_DIR',
4755
defaultValue: 'koji-drop',
4856
description: 'Workspace subdir to place downloaded artifacts (empty = workspace root)'),
4957
string(name: 'KOJI_MAX_PREV_BUILDS',
5058
defaultValue: '5',
51-
description: 'Depth for previous builds'),
59+
description: 'How far back to look when selecting latest match (integer)'),
5260
booleanParam(name: 'KOJI_CLEAN_DESTINATION', defaultValue: true, description: 'Clean before download'),
5361
booleanParam(name: 'KOJI_CREATE_SUBDIR_PER_NVR', defaultValue: true, description: 'Create subdir per NVR')
5462
]),
@@ -78,21 +86,22 @@ timestamps {
7886
reportActivity(name: 'koji-fetch', executionId: params.executionId) {
7987
checkout([$class: 'KojiSCM',
8088
kojiBuildProviders: [[
81-
$class: 'KojiSimpleBuildProvider',
82-
packageName: params.KOJI_PACKAGE_NAME,
83-
packageTag: params.KOJI_PACKAGE_TAG,
84-
packageArch: params.KOJI_PACKAGE_ARCH,
85-
excludeNvrs: params.KOJI_EXCLUDE_NVRS
89+
$class: 'KojiBuildProvider',
90+
topUrl: params.KOJI_TOP_URL,
91+
downloadUrl: params.KOJI_DOWNLOAD_URL
8692
]],
8793
kojiXmlRpcApi: [
88-
$class: 'KojiXmlRpcApi',
89-
topUrls: params.KOJI_TOP_URLS,
90-
downloadUrls: params.KOJI_DOWNLOAD_URLS
94+
$class: 'RealKojiXmlRpcApi',
95+
packageName: params.KOJI_PACKAGE_NAME,
96+
arch: params.KOJI_ARCH, // may be comma-separated per plugin docs [3](https://docs.pagure.org/koji/image_build/)
97+
tag: params.KOJI_TAG,
98+
subpackageDenylist: params.KOJI_SUBPACKAGE_DENYLIST,
99+
subpackageAllowlist: params.KOJI_SUBPACKAGE_ALLOWLIST
91100
],
92-
downloadDir: params.KOJI_DOWNLOAD_DIR,
93-
cleanDownloadDir: params.KOJI_CLEAN_DESTINATION,
94-
dirPerNvr: params.KOJI_CREATE_SUBDIR_PER_NVR,
95-
maxPreviousBuilds: params.KOJI_MAX_PREV_BUILDS as Integer
101+
downloadDir: params.KOJI_DOWNLOAD_DIR,
102+
cleanDownloadDir: params.KOJI_CLEAN_DESTINATION,
103+
dirPerNvr: params.KOJI_CREATE_SUBDIR_PER_NVR,
104+
maxPreviousBuilds: params.KOJI_MAX_PREV_BUILDS as Integer
96105
])
97106
}
98107
}

0 commit comments

Comments
 (0)