Skip to content

Commit

Permalink
Merge pull request #3148 from nilxam/letter_staging_leap_16_2
Browse files Browse the repository at this point in the history
gocd: use Leap as pipeline group and fix the format error
  • Loading branch information
nilxam committed Aug 27, 2024
2 parents 27d9142 + 7c81c2f commit 4114946
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 25 deletions.
57 changes: 39 additions & 18 deletions gocd/pkglistgen_staging.gocd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1168,12 +1168,13 @@ pipelines:
done
./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success
"Leap.Staging.A":
environment_variables:
STAGING_PROJECT: openSUSE:Leap:16.0:Staging:A
STAGING_API: https://api.opensuse.org
OSC_CONFIG: /home/go/config/oscrc-staging-bot
group: Leap.16.0.pkglistgen
group: Leap
lock_behavior: unlockWhenFinished
materials:
stagings:
Expand Down Expand Up @@ -1207,18 +1208,25 @@ pipelines:
tasks:
- script: |-
./scripts/staging-installcheck.py -A $STAGING_API -p openSUSE:Leap:16.0 -s $STAGING_PROJECT
- Enable.images.repo:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=images&flag=build"
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=images&flag=build"
export PYTHONPATH=$PWD/scripts
while osc -A $STAGING_API api "/build/$STAGING_PROJECT/_result?view=summary&repository=images" | grep 'dirty=.true.'; do
sleep 60
done
./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success
"Leap.Staging.B":
environment_variables:
STAGING_PROJECT: openSUSE:Leap:16.0:Staging:B
STAGING_API: https://api.opensuse.org
OSC_CONFIG: /home/go/config/oscrc-staging-bot
group: Leap.16.0.pkglistgen
group: Leap
lock_behavior: unlockWhenFinished
materials:
stagings:
Expand Down Expand Up @@ -1252,18 +1260,25 @@ pipelines:
tasks:
- script: |-
./scripts/staging-installcheck.py -A $STAGING_API -p openSUSE:Leap:16.0 -s $STAGING_PROJECT
- Enable.images.repo:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=images&flag=build"
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=images&flag=build"
export PYTHONPATH=$PWD/scripts
while osc -A $STAGING_API api "/build/$STAGING_PROJECT/_result?view=summary&repository=images" | grep 'dirty=.true.'; do
sleep 60
done
./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success
"Leap.Staging.C":
environment_variables:
STAGING_PROJECT: openSUSE:Leap:16.0:Staging:C
STAGING_API: https://api.opensuse.org
OSC_CONFIG: /home/go/config/oscrc-staging-bot
group: Leap.16.0.pkglistgen
group: Leap
lock_behavior: unlockWhenFinished
materials:
stagings:
Expand Down Expand Up @@ -1297,10 +1312,16 @@ pipelines:
tasks:
- script: |-
./scripts/staging-installcheck.py -A $STAGING_API -p openSUSE:Leap:16.0 -s $STAGING_PROJECT
- Enable.images.repo:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=images&flag=build"
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=images&flag=build"
export PYTHONPATH=$PWD/scripts
while osc -A $STAGING_API api "/build/$STAGING_PROJECT/_result?view=summary&repository=images" | grep 'dirty=.true.'; do
sleep 60
done
./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success
20 changes: 13 additions & 7 deletions gocd/pkglistgen_staging.gocd.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ pipelines:
./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success
<% end %>
<% leap_stagings = %w(A B C) -%>
<% leap_stagings.each do |letter| -%>
<% leap_stagings.each do |letter| %>
"Leap.Staging.<%= letter %>":
environment_variables:
STAGING_PROJECT: openSUSE:Leap:16.0:Staging:<%= letter %>
STAGING_API: https://api.opensuse.org
OSC_CONFIG: /home/go/config/oscrc-staging-bot
group: Leap.16.0.pkglistgen
group: Leap
lock_behavior: unlockWhenFinished
materials:
stagings:
Expand Down Expand Up @@ -132,10 +132,16 @@ pipelines:
tasks:
- script: |-
./scripts/staging-installcheck.py -A $STAGING_API -p openSUSE:Leap:16.0 -s $STAGING_PROJECT

- Enable.images.repo:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=images&flag=build"
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=images&flag=build"
export PYTHONPATH=$PWD/scripts
while osc -A $STAGING_API api "/build/$STAGING_PROJECT/_result?view=summary&repository=images" | grep 'dirty=.true.'; do
sleep 60
done
./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success
<% end %>

0 comments on commit 4114946

Please sign in to comment.