Skip to content

Commit

Permalink
Reduce usage of the message 'artifact' dict
Browse files Browse the repository at this point in the history
To help with https://pagure.io/fedora-ci/general/issue/436 ,
this reduces use of the 'artifact' dict from the Bodhi 'update
ready for testing' message to only use the 'task_id' values
from the 'build' dicts. This will let us simplify the message
format in Bodhi.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
  • Loading branch information
AdamWill committed Nov 23, 2023
1 parent 4e191d0 commit 2253f83
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pipeline {
queue: 'osci-pipelines-queue-10'
],
checks: [
[field: '$.artifact.release', expectedValue: '^f[3-9]{1}[0-9]{1}$']
[field: '$.update.release.dist_tag', expectedValue: '^f[3-9]{1}[0-9]{1}$']
]
)
]
Expand All @@ -45,16 +45,16 @@ pipeline {

if (msg) {

if (msg['artifact']['builds'].size() > 20) {
echo "There are way too many (${msg['artifact']['builds'].size()} > 20) builds in the update. Skipping..."
if (msg['update']['builds'].size() > 20) {
echo "There are way too many (${msg['update']['builds'].size()} > 20) builds in the update. Skipping..."
return
}

msg['artifact']['builds'].each { build ->
allTaskIds.add(build['task_id'])
}

def testProfile = msg['artifact']['release']
def testProfile = msg['update']['release']['dist_tag']

if (allTaskIds) {
allTaskIds.each { taskId ->
Expand Down

0 comments on commit 2253f83

Please sign in to comment.