Create Staging pipelines for ALP Dolomite 1.0

This commit is contained in:
Gustavo Yokoyama Ribeiro 2023-12-26 11:13:37 -03:00
parent 02b3886bf3
commit 30fd79dde6
4 changed files with 396 additions and 0 deletions

View File

@ -1,5 +1,60 @@
format_version: 3
pipelines:
ALP.Dolomite.Project:
group: ALP.Checkers
lock_behavior: unlockWhenFinished
timer:
spec: 0 0 * ? * *
only_on_changes: false
materials:
git:
git: https://github.com/openSUSE/openSUSE-release-tools.git
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-repo-checker
stages:
- Run:
timeout: 30
approval: manual
jobs:
ALP.Dolomite:
resources:
- repo-checker
tasks:
- script: ./project-installcheck.py -A https://api.suse.de --debug check --store SUSE:ALP:Products:Dolomite:1.0:Staging/dashboard --no-rebuild SUSE:ALP:Products:Dolomite:1.0
ALP.Dolomite.Staging.Bot.Regular:
group: ALP.Checkers
lock_behavior: unlockWhenFinished
timer:
spec: 0 0 * ? * *
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
materials:
git:
git: https://github.com/openSUSE/openSUSE-release-tools.git
stages:
- Run:
approval:
type: manual
jobs:
Run:
timeout: 30
resources:
- staging-bot
tasks:
- script: |-
set -e
tempdir=$(mktemp -d)
mkdir -p $tempdir/.osc-plugins
ln -s $PWD/osc-staging.py $tempdir/.osc-plugins
ln -s $PWD/osclib $tempdir/.osc-plugins
export HOME=$tempdir
osc -A https://api.suse.de staging -p SUSE:ALP:Products:Dolomite:1.0 rebuild
osc -A https://api.suse.de staging -p SUSE:ALP:Products:Dolomite:1.0 list --supersede
osc -A https://api.suse.de staging -p SUSE:ALP:Products:Dolomite:1.0 select --non-interactive --merge --try-strategies
osc -A https://api.suse.de staging -p SUSE:ALP:Products:Dolomite:1.0 unselect --cleanup
osc -A https://api.suse.de staging -p SUSE:ALP:Products:Dolomite:1.0 repair --cleanup
rm -rf $tempdir
ALP.Source.Standard.1_0.Staging.Bot.Regular:
group: ALP.Checkers
lock_behavior: unlockWhenFinished
@ -33,6 +88,27 @@ pipelines:
osc -A https://api.suse.de staging -p SUSE:ALP:Source:Standard:1.0 unselect --cleanup
osc -A https://api.suse.de staging -p SUSE:ALP:Source:Standard:1.0 repair --cleanup
rm -rf $tempdir
ALP.Dolomite.Staging.Bot.Report:
group: ALP.Checkers
lock_behavior: unlockWhenFinished
timer:
spec: 0 */3 * ? * *
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
materials:
git:
git: https://github.com/openSUSE/openSUSE-release-tools.git
stages:
- Run:
approval:
type: manual
jobs:
Run:
timeout: 30
resources:
- staging-bot
tasks:
- script: ./staging-report.py --debug -A https://api.suse.de -p SUSE:ALP:Products:Dolomite:1.0
ALP.Source.Standard.1_0.Staging.Bot.Report:
group: ALP.Checkers
lock_behavior: unlockWhenFinished

View File

@ -1,5 +1,60 @@
format_version: 3
pipelines:
ALP.Dolomite.Project:
group: ALP.Checkers
lock_behavior: unlockWhenFinished
timer:
spec: 0 0 * ? * *
only_on_changes: false
materials:
git:
git: https://github.com/openSUSE/openSUSE-release-tools.git
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-repo-checker
stages:
- Run:
timeout: 30
approval: manual
jobs:
ALP.Dolomite:
resources:
- repo-checker
tasks:
- script: ./project-installcheck.py -A https://api.suse.de --debug check --store SUSE:ALP:Products:Dolomite:1.0:Staging/dashboard --no-rebuild SUSE:ALP:Products:Dolomite:1.0
ALP.Dolomite.Staging.Bot.Regular:
group: ALP.Checkers
lock_behavior: unlockWhenFinished
timer:
spec: 0 0 * ? * *
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
materials:
git:
git: https://github.com/openSUSE/openSUSE-release-tools.git
stages:
- Run:
approval:
type: manual
jobs:
Run:
timeout: 30
resources:
- staging-bot
tasks:
- script: |-
set -e
tempdir=$(mktemp -d)
mkdir -p $tempdir/.osc-plugins
ln -s $PWD/osc-staging.py $tempdir/.osc-plugins
ln -s $PWD/osclib $tempdir/.osc-plugins
export HOME=$tempdir
osc -A https://api.suse.de staging -p SUSE:ALP:Products:Dolomite:1.0 rebuild
osc -A https://api.suse.de staging -p SUSE:ALP:Products:Dolomite:1.0 list --supersede
osc -A https://api.suse.de staging -p SUSE:ALP:Products:Dolomite:1.0 select --non-interactive --merge --try-strategies
osc -A https://api.suse.de staging -p SUSE:ALP:Products:Dolomite:1.0 unselect --cleanup
osc -A https://api.suse.de staging -p SUSE:ALP:Products:Dolomite:1.0 repair --cleanup
rm -rf $tempdir
ALP.Source.Standard.1_0.Staging.Bot.Regular:
group: ALP.Checkers
lock_behavior: unlockWhenFinished
@ -33,6 +88,27 @@ pipelines:
osc -A https://api.suse.de staging -p SUSE:ALP:Source:Standard:1.0 unselect --cleanup
osc -A https://api.suse.de staging -p SUSE:ALP:Source:Standard:1.0 repair --cleanup
rm -rf $tempdir
ALP.Dolomite.Staging.Bot.Report:
group: ALP.Checkers
lock_behavior: unlockWhenFinished
timer:
spec: 0 */3 * ? * *
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
materials:
git:
git: https://github.com/openSUSE/openSUSE-release-tools.git
stages:
- Run:
approval:
type: manual
jobs:
Run:
timeout: 30
resources:
- staging-bot
tasks:
- script: ./staging-report.py --debug -A https://api.suse.de -p SUSE:ALP:Products:Dolomite:1.0
ALP.Source.Standard.1_0.Staging.Bot.Report:
group: ALP.Checkers
lock_behavior: unlockWhenFinished

View File

@ -0,0 +1,154 @@
---
format_version: 3
pipelines:
Dolomite.Stagings.RelPkgs:
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
group: ALP.Target
lock_behavior: unlockWhenFinished
timer:
spec: 0 0 * ? * *
only_on_changes: false
materials:
scripts:
git: https://github.com/openSUSE/openSUSE-release-tools.git
stages:
- Generate.Release.Package:
approval: manual
jobs:
Dolomite.Staging.A:
resources:
- repo-checker
tasks:
- script: ./pkglistgen.py -A https://api.suse.de update_and_solve
--staging SUSE:ALP:Products:Dolomite:1.0:Staging:A
--only-release-packages --force
Dolomite.Staging.B:
resources:
- repo-checker
tasks:
- script: ./pkglistgen.py -A https://api.suse.de update_and_solve
--staging SUSE:ALP:Products:Dolomite:1.0:Staging:B
--only-release-packages --force
Dolomite.Staging.A:
environment_variables:
STAGING_PROJECT: SUSE:ALP:Products:Dolomite:1.0:Staging:A
STAGING_API: https://api.suse.de
OSC_CONFIG: /home/go/config/oscrc-staging-bot
group: ALP.Target
lock_behavior: unlockWhenFinished
materials:
stagings:
git: git://botmaster.suse.de/suse-repos.git
auto_update: true
destination: repos
whitelist:
- SUSE:ALP:Products:Dolomite:1.0:Staging:A_-_standard.yaml
scripts:
auto_update: true
git: https://github.com/openSUSE/openSUSE-release-tools.git
whitelist:
- DO_NOT_TRIGGER
destination: scripts
stages:
- Checks:
jobs:
Check.Build.Succeeds:
resources:
- staging-bot
tasks:
- script: |-
export PYTHONPATH=$PWD/scripts
cd scripts/gocd
./report-status.py -A $STAGING_API -p $STAGING_PROJECT -n packagelists -r standard -s pending
./verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r standard
Repo.Checker:
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
resources:
- repo-checker
tasks:
- script: ./scripts/staging-installcheck.py -A $STAGING_API -p SUSE:ALP:Products:Dolomite:1.0 -s $STAGING_PROJECT
- Update.000product:
resources:
- repo-checker
tasks:
- script: |-
export PYTHONPATH=$PWD/scripts
cd scripts/gocd
if ../pkglistgen.py --debug -A $STAGING_API update_and_solve --staging $STAGING_PROJECT --force; then
./report-status.py -A $STAGING_API -p $STAGING_PROJECT -n packagelists -r standard -s success
else
./report-status.py -A $STAGING_API -p $STAGING_PROJECT -n packagelists -r standard -s failure
exit 1
fi
- 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"
Dolomite.Staging.B:
environment_variables:
STAGING_PROJECT: SUSE:ALP:Products:Dolomite:1.0:Staging:B
STAGING_API: https://api.suse.de
OSC_CONFIG: /home/go/config/oscrc-staging-bot
group: ALP.Target
lock_behavior: unlockWhenFinished
materials:
stagings:
git: git://botmaster.suse.de/suse-repos.git
auto_update: true
destination: repos
whitelist:
- SUSE:ALP:Products:Dolomite:1.0:Staging:B_-_standard.yaml
scripts:
auto_update: true
git: https://github.com/openSUSE/openSUSE-release-tools.git
whitelist:
- DO_NOT_TRIGGER
destination: scripts
stages:
- Checks:
jobs:
Check.Build.Succeeds:
resources:
- staging-bot
tasks:
- script: |-
export PYTHONPATH=$PWD/scripts
cd scripts/gocd
./report-status.py -A $STAGING_API -p $STAGING_PROJECT -n packagelists -r standard -s pending
./verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r standard
Repo.Checker:
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
resources:
- repo-checker
tasks:
- script: ./scripts/staging-installcheck.py -A $STAGING_API -p SUSE:ALP:Products:Dolomite:1.0 -s $STAGING_PROJECT
- Update.000product:
resources:
- repo-checker
tasks:
- script: |-
export PYTHONPATH=$PWD/scripts
cd scripts/gocd
if ../pkglistgen.py --debug -A $STAGING_API update_and_solve --staging $STAGING_PROJECT --force; then
./report-status.py -A $STAGING_API -p $STAGING_PROJECT -n packagelists -r standard -s success
else
./report-status.py -A $STAGING_API -p $STAGING_PROJECT -n packagelists -r standard -s failure
exit 1
fi
- 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"

View File

@ -0,0 +1,90 @@
---
<% stagings = %w(A B) -%>
format_version: 3
pipelines:
Dolomite.Stagings.RelPkgs:
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
group: ALP.Target
lock_behavior: unlockWhenFinished
timer:
spec: 0 0 * ? * *
only_on_changes: false
materials:
scripts:
git: https://github.com/openSUSE/openSUSE-release-tools.git
stages:
- Generate.Release.Package:
approval: manual
jobs:
<% stagings.each do |letter| -%>
Dolomite.Staging.<%= letter %>:
resources:
- repo-checker
tasks:
- script: ./pkglistgen.py -A https://api.suse.de update_and_solve
--staging SUSE:ALP:Products:Dolomite:1.0:Staging:<%= letter %>
--only-release-packages --force
<% end -%>
<% stagings.each do |letter| %>
Dolomite.Staging.<%= letter %>:
environment_variables:
STAGING_PROJECT: SUSE:ALP:Products:Dolomite:1.0:Staging:<%= letter %>
STAGING_API: https://api.suse.de
OSC_CONFIG: /home/go/config/oscrc-staging-bot
group: ALP.Target
lock_behavior: unlockWhenFinished
materials:
stagings:
git: git://botmaster.suse.de/suse-repos.git
auto_update: true
destination: repos
whitelist:
- SUSE:ALP:Products:Dolomite:1.0:Staging:<%= letter %>_-_standard.yaml
scripts:
auto_update: true
git: https://github.com/openSUSE/openSUSE-release-tools.git
whitelist:
- DO_NOT_TRIGGER
destination: scripts
stages:
- Checks:
jobs:
Check.Build.Succeeds:
resources:
- staging-bot
tasks:
- script: |-
export PYTHONPATH=$PWD/scripts
cd scripts/gocd
./report-status.py -A $STAGING_API -p $STAGING_PROJECT -n packagelists -r standard -s pending
./verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r standard
Repo.Checker:
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
resources:
- repo-checker
tasks:
- script: ./scripts/staging-installcheck.py -A $STAGING_API -p SUSE:ALP:Products:Dolomite:1.0 -s $STAGING_PROJECT
- Update.000product:
resources:
- repo-checker
tasks:
- script: |-
export PYTHONPATH=$PWD/scripts
cd scripts/gocd
if ../pkglistgen.py --debug -A $STAGING_API update_and_solve --staging $STAGING_PROJECT --force; then
./report-status.py -A $STAGING_API -p $STAGING_PROJECT -n packagelists -r standard -s success
else
./report-status.py -A $STAGING_API -p $STAGING_PROJECT -n packagelists -r standard -s failure
exit 1
fi
- 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 -%>