From b0fee1244004b1ea4cb75cac6bf5ec1d68765156 Mon Sep 17 00:00:00 2001 From: Max Lin Date: Tue, 27 Aug 2024 19:28:51 +0800 Subject: [PATCH] gocd: add checks for letter stagings in Leap 16.0 --- gocd/pkglistgen_staging.gocd.yaml | 136 ++++++++++++++++++++++++++ gocd/pkglistgen_staging.gocd.yaml.erb | 48 +++++++++ 2 files changed, 184 insertions(+) diff --git a/gocd/pkglistgen_staging.gocd.yaml b/gocd/pkglistgen_staging.gocd.yaml index 5f38ff4e..2ca3fcb5 100644 --- a/gocd/pkglistgen_staging.gocd.yaml +++ b/gocd/pkglistgen_staging.gocd.yaml @@ -1168,3 +1168,139 @@ 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 + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/opensuse-repos.git + auto_update: true + destination: repos + whitelist: + - openSUSE:Leap:16.0:Staging:A_-_standard.yaml + scripts: + git: https://github.com/openSUSE/openSUSE-release-tools.git + auto_update: true + destination: scripts + whitelist: + - DO_NOT_TRIGGER + stages: + - Checks: + jobs: + Check.Build.Succeeds: + resources: + - staging-bot + tasks: + - script: |- + export PYTHONPATH=scripts + ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r standard + + Repo.Checker: + environment_variables: + OSC_CONFIG: /home/go/config/oscrc-repo-checker + resources: + - repo-checker + 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" + "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 + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/opensuse-repos.git + auto_update: true + destination: repos + whitelist: + - openSUSE:Leap:16.0:Staging:B_-_standard.yaml + scripts: + git: https://github.com/openSUSE/openSUSE-release-tools.git + auto_update: true + destination: scripts + whitelist: + - DO_NOT_TRIGGER + stages: + - Checks: + jobs: + Check.Build.Succeeds: + resources: + - staging-bot + tasks: + - script: |- + export PYTHONPATH=scripts + ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r standard + + Repo.Checker: + environment_variables: + OSC_CONFIG: /home/go/config/oscrc-repo-checker + resources: + - repo-checker + 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" + "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 + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/opensuse-repos.git + auto_update: true + destination: repos + whitelist: + - openSUSE:Leap:16.0:Staging:C_-_standard.yaml + scripts: + git: https://github.com/openSUSE/openSUSE-release-tools.git + auto_update: true + destination: scripts + whitelist: + - DO_NOT_TRIGGER + stages: + - Checks: + jobs: + Check.Build.Succeeds: + resources: + - staging-bot + tasks: + - script: |- + export PYTHONPATH=scripts + ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r standard + + Repo.Checker: + environment_variables: + OSC_CONFIG: /home/go/config/oscrc-repo-checker + resources: + - repo-checker + 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" + diff --git a/gocd/pkglistgen_staging.gocd.yaml.erb b/gocd/pkglistgen_staging.gocd.yaml.erb index 09c4a16a..493d3fcc 100644 --- a/gocd/pkglistgen_staging.gocd.yaml.erb +++ b/gocd/pkglistgen_staging.gocd.yaml.erb @@ -91,3 +91,51 @@ pipelines: done ./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.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 + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/opensuse-repos.git + auto_update: true + destination: repos + whitelist: + - openSUSE:Leap:16.0:Staging:<%= letter %>_-_standard.yaml + scripts: + git: https://github.com/openSUSE/openSUSE-release-tools.git + auto_update: true + destination: scripts + whitelist: + - DO_NOT_TRIGGER + stages: + - Checks: + jobs: + Check.Build.Succeeds: + resources: + - staging-bot + tasks: + - script: |- + export PYTHONPATH=scripts + ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r standard + + Repo.Checker: + environment_variables: + OSC_CONFIG: /home/go/config/oscrc-repo-checker + resources: + - repo-checker + 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" +<% end %>