diff --git a/gocd/slfo-stagings.gocd.yaml b/gocd/slfo-stagings.gocd.yaml index f13d017b2..86ade9ffb 100644 --- a/gocd/slfo-stagings.gocd.yaml +++ b/gocd/slfo-stagings.gocd.yaml @@ -1082,64 +1082,6 @@ pipelines: sleep 60 done ./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success - SUSE.SLFO.1.1.Staging.Weekly.Freeze: - environment_variables: - SLFO_1_1_PROJECT: SUSE:SLFO:1.1 - SLFO_1_1_RING_1_PROJECT: SUSE:SLFO:1.1:Staging:Rings:1-MinimalX - STAGING_API: https://api.suse.de - OSC_CONFIG: /home/go/config/oscrc-staging-bot - group: SLFO.1.1.Stagings - lock_behavior: unlockWhenFinished - timer: - spec: "0 0 0-23 ? * SUN" - materials: - scripts: - auto_update: true - git: https://github.com/openSUSE/openSUSE-release-tools.git - whitelist: - - DO_NOT_TRIGGER - stages: - - Check.Ring.1.Finished: - timeout: 50 - resources: - - staging-bot - tasks: - - script: |- - set -eu - status="$(osc -A $STAGING_API api /build/$SLFO_1_1_RING_1_PROJECT/standard/x86_64?view=status | grep 'code=' | sed -E 's/^.*code="(.*)".*$/\1/')" - echo $SLFO_1_1_RING_1_PROJECT status: "${status}" - if printf '%s' "${status}" | grep -q finished; then - exit 0 - else - exit 1 - fi - - Freeze.stagings: - ## 6 hours (at most 30 minutes per staging) - timeout: 360 - resources: - - staging-bot - tasks: - - script: |- - set -eu - export PYTHONPATH=$PWD - - ## Setup osc staging plugin - 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 - - for letter in A B C D E F G H S V Y ; do - ## if the staging was frozen today, skip it - if ! osc -A $STAGING_API meta attribute "${SLFO_1_1_PROJECT}:Staging:${letter}" --attribute OSRT:FreezeTime | grep $(date +%Y-%m-%d); then - osc -A $STAGING_API staging freeze -p $SLFO_1_1_PROJECT $letter - else - echo "${SLFO_1_1_PROJECT}:Staging:${letter}" was frozen today, skipping it... - fi - done - ## Tear down osc staging plugin - rm -rf $tempdir SUSE.SLFO.1.1.Staging.A: environment_variables: @@ -1183,46 +1125,6 @@ pipelines: - script: |- ./scripts/staging-installcheck.py -A $STAGING_API -p $SLFO_1_1_PROJECT -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 --engine product_composer --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 - - - Build.product: - timeout: 180 - resources: - - staging-bot - tasks: - - script: |- - minutes=1 - osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build" - export PYTHONPATH=$PWD/scripts - ## Let the scheduler warm up first - sleep 60 - while osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -E 'statuscount code="(blocked|scheduled|building)"'; do - if [ ${minutes} -gt 180 ]; then - echo "Product is still building after timeout, exiting..." >&2 - exit 1 - fi - sleep 60 - minutes=$(expr $minutes + 1) - done - ## Always fail on broken/failed products - if osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -qE 'statuscount code="(broken|failed)"'; then - echo "Some products failed to build, exiting..." >&2 - exit 1 - fi - - Enable.images.repo: resources: - staging-bot @@ -1277,46 +1179,6 @@ pipelines: - script: |- ./scripts/staging-installcheck.py -A $STAGING_API -p $SLFO_1_1_PROJECT -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 --engine product_composer --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 - - - Build.product: - timeout: 180 - resources: - - staging-bot - tasks: - - script: |- - minutes=1 - osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build" - export PYTHONPATH=$PWD/scripts - ## Let the scheduler warm up first - sleep 60 - while osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -E 'statuscount code="(blocked|scheduled|building)"'; do - if [ ${minutes} -gt 180 ]; then - echo "Product is still building after timeout, exiting..." >&2 - exit 1 - fi - sleep 60 - minutes=$(expr $minutes + 1) - done - ## Always fail on broken/failed products - if osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -qE 'statuscount code="(broken|failed)"'; then - echo "Some products failed to build, exiting..." >&2 - exit 1 - fi - - Enable.images.repo: resources: - staging-bot @@ -1371,46 +1233,6 @@ pipelines: - script: |- ./scripts/staging-installcheck.py -A $STAGING_API -p $SLFO_1_1_PROJECT -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 --engine product_composer --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 - - - Build.product: - timeout: 180 - resources: - - staging-bot - tasks: - - script: |- - minutes=1 - osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build" - export PYTHONPATH=$PWD/scripts - ## Let the scheduler warm up first - sleep 60 - while osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -E 'statuscount code="(blocked|scheduled|building)"'; do - if [ ${minutes} -gt 180 ]; then - echo "Product is still building after timeout, exiting..." >&2 - exit 1 - fi - sleep 60 - minutes=$(expr $minutes + 1) - done - ## Always fail on broken/failed products - if osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -qE 'statuscount code="(broken|failed)"'; then - echo "Some products failed to build, exiting..." >&2 - exit 1 - fi - - Enable.images.repo: resources: - staging-bot @@ -1465,46 +1287,6 @@ pipelines: - script: |- ./scripts/staging-installcheck.py -A $STAGING_API -p $SLFO_1_1_PROJECT -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 --engine product_composer --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 - - - Build.product: - timeout: 180 - resources: - - staging-bot - tasks: - - script: |- - minutes=1 - osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build" - export PYTHONPATH=$PWD/scripts - ## Let the scheduler warm up first - sleep 60 - while osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -E 'statuscount code="(blocked|scheduled|building)"'; do - if [ ${minutes} -gt 180 ]; then - echo "Product is still building after timeout, exiting..." >&2 - exit 1 - fi - sleep 60 - minutes=$(expr $minutes + 1) - done - ## Always fail on broken/failed products - if osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -qE 'statuscount code="(broken|failed)"'; then - echo "Some products failed to build, exiting..." >&2 - exit 1 - fi - - Enable.images.repo: resources: - staging-bot @@ -1559,46 +1341,6 @@ pipelines: - script: |- ./scripts/staging-installcheck.py -A $STAGING_API -p $SLFO_1_1_PROJECT -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 --engine product_composer --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 - - - Build.product: - timeout: 180 - resources: - - staging-bot - tasks: - - script: |- - minutes=1 - osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build" - export PYTHONPATH=$PWD/scripts - ## Let the scheduler warm up first - sleep 60 - while osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -E 'statuscount code="(blocked|scheduled|building)"'; do - if [ ${minutes} -gt 180 ]; then - echo "Product is still building after timeout, exiting..." >&2 - exit 1 - fi - sleep 60 - minutes=$(expr $minutes + 1) - done - ## Always fail on broken/failed products - if osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -qE 'statuscount code="(broken|failed)"'; then - echo "Some products failed to build, exiting..." >&2 - exit 1 - fi - - Enable.images.repo: resources: - staging-bot @@ -1653,52 +1395,12 @@ pipelines: - script: |- ./scripts/staging-installcheck.py -A $STAGING_API -p $SLFO_1_1_PROJECT -s $STAGING_PROJECT - - Update.000product: + - Enable.images.repo: resources: - - repo-checker + - staging-bot tasks: - script: |- - export PYTHONPATH=$PWD/scripts - cd scripts/gocd - - if ../pkglistgen.py --debug -A $STAGING_API update_and_solve --engine product_composer --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 - - - Build.product: - timeout: 180 - resources: - - staging-bot - tasks: - - script: |- - minutes=1 - osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build" - export PYTHONPATH=$PWD/scripts - ## Let the scheduler warm up first - sleep 60 - while osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -E 'statuscount code="(blocked|scheduled|building)"'; do - if [ ${minutes} -gt 180 ]; then - echo "Product is still building after timeout, exiting..." >&2 - exit 1 - fi - sleep 60 - minutes=$(expr $minutes + 1) - done - ## Always fail on broken/failed products - if osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -qE 'statuscount code="(broken|failed)"'; then - echo "Some products failed to build, exiting..." >&2 - 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" + 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 @@ -1747,46 +1449,6 @@ pipelines: - script: |- ./scripts/staging-installcheck.py -A $STAGING_API -p $SLFO_1_1_PROJECT -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 --engine product_composer --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 - - - Build.product: - timeout: 180 - resources: - - staging-bot - tasks: - - script: |- - minutes=1 - osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build" - export PYTHONPATH=$PWD/scripts - ## Let the scheduler warm up first - sleep 60 - while osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -E 'statuscount code="(blocked|scheduled|building)"'; do - if [ ${minutes} -gt 180 ]; then - echo "Product is still building after timeout, exiting..." >&2 - exit 1 - fi - sleep 60 - minutes=$(expr $minutes + 1) - done - ## Always fail on broken/failed products - if osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -qE 'statuscount code="(broken|failed)"'; then - echo "Some products failed to build, exiting..." >&2 - exit 1 - fi - - Enable.images.repo: resources: - staging-bot @@ -1841,46 +1503,6 @@ pipelines: - script: |- ./scripts/staging-installcheck.py -A $STAGING_API -p $SLFO_1_1_PROJECT -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 --engine product_composer --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 - - - Build.product: - timeout: 180 - resources: - - staging-bot - tasks: - - script: |- - minutes=1 - osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build" - export PYTHONPATH=$PWD/scripts - ## Let the scheduler warm up first - sleep 60 - while osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -E 'statuscount code="(blocked|scheduled|building)"'; do - if [ ${minutes} -gt 180 ]; then - echo "Product is still building after timeout, exiting..." >&2 - exit 1 - fi - sleep 60 - minutes=$(expr $minutes + 1) - done - ## Always fail on broken/failed products - if osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -qE 'statuscount code="(broken|failed)"'; then - echo "Some products failed to build, exiting..." >&2 - exit 1 - fi - - Enable.images.repo: resources: - staging-bot @@ -1893,10 +1515,10 @@ pipelines: done ./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success - SUSE.SLFO.1.1.Staging.S: + SUSE.SLFO.1.1.Staging.I: environment_variables: SLFO_1_1_PROJECT: SUSE:SLFO:1.1 - STAGING_PROJECT: SUSE:SLFO:1.1:Staging:S + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:I STAGING_API: https://api.suse.de OSC_CONFIG: /home/go/config/oscrc-staging-bot group: SLFO.1.1.Stagings @@ -1907,7 +1529,7 @@ pipelines: auto_update: true destination: repos whitelist: - - SUSE:SLFO:1.1:Staging:S_-_standard.yaml + - SUSE:SLFO:1.1:Staging:I_-_standard.yaml scripts: auto_update: true git: https://github.com/openSUSE/openSUSE-release-tools.git @@ -1935,46 +1557,6 @@ pipelines: - script: |- ./scripts/staging-installcheck.py -A $STAGING_API -p $SLFO_1_1_PROJECT -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 --engine product_composer --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 - - - Build.product: - timeout: 180 - resources: - - staging-bot - tasks: - - script: |- - minutes=1 - osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build" - export PYTHONPATH=$PWD/scripts - ## Let the scheduler warm up first - sleep 60 - while osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -E 'statuscount code="(blocked|scheduled|building)"'; do - if [ ${minutes} -gt 180 ]; then - echo "Product is still building after timeout, exiting..." >&2 - exit 1 - fi - sleep 60 - minutes=$(expr $minutes + 1) - done - ## Always fail on broken/failed products - if osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -qE 'statuscount code="(broken|failed)"'; then - echo "Some products failed to build, exiting..." >&2 - exit 1 - fi - - Enable.images.repo: resources: - staging-bot @@ -1987,10 +1569,10 @@ pipelines: done ./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success - SUSE.SLFO.1.1.Staging.V: + SUSE.SLFO.1.1.Staging.J: environment_variables: SLFO_1_1_PROJECT: SUSE:SLFO:1.1 - STAGING_PROJECT: SUSE:SLFO:1.1:Staging:V + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:J STAGING_API: https://api.suse.de OSC_CONFIG: /home/go/config/oscrc-staging-bot group: SLFO.1.1.Stagings @@ -2001,7 +1583,7 @@ pipelines: auto_update: true destination: repos whitelist: - - SUSE:SLFO:1.1:Staging:V_-_standard.yaml + - SUSE:SLFO:1.1:Staging:J_-_standard.yaml scripts: auto_update: true git: https://github.com/openSUSE/openSUSE-release-tools.git @@ -2029,45 +1611,59 @@ pipelines: - script: |- ./scripts/staging-installcheck.py -A $STAGING_API -p $SLFO_1_1_PROJECT -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 --engine product_composer --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 - - - Build.product: - timeout: 180 + - Enable.images.repo: resources: - staging-bot tasks: - script: |- - minutes=1 - osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build" + osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=images&flag=build" export PYTHONPATH=$PWD/scripts - ## Let the scheduler warm up first - sleep 60 - while osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -E 'statuscount code="(blocked|scheduled|building)"'; do - if [ ${minutes} -gt 180 ]; then - echo "Product is still building after timeout, exiting..." >&2 - exit 1 - fi + while osc -A $STAGING_API api "/build/$STAGING_PROJECT/_result?view=summary&repository=images" | grep 'dirty=.true.'; do sleep 60 - minutes=$(expr $minutes + 1) done - ## Always fail on broken/failed products - if osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -qE 'statuscount code="(broken|failed)"'; then - echo "Some products failed to build, exiting..." >&2 - exit 1 - fi + ./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success + + SUSE.SLFO.1.1.Staging.K: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:K + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:K_-_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 $SLFO_1_1_PROJECT -s $STAGING_PROJECT - Enable.images.repo: resources: @@ -2081,10 +1677,10 @@ pipelines: done ./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success - SUSE.SLFO.1.1.Staging.Y: + SUSE.SLFO.1.1.Staging.L: environment_variables: SLFO_1_1_PROJECT: SUSE:SLFO:1.1 - STAGING_PROJECT: SUSE:SLFO:1.1:Staging:Y + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:L STAGING_API: https://api.suse.de OSC_CONFIG: /home/go/config/oscrc-staging-bot group: SLFO.1.1.Stagings @@ -2095,7 +1691,7 @@ pipelines: auto_update: true destination: repos whitelist: - - SUSE:SLFO:1.1:Staging:Y_-_standard.yaml + - SUSE:SLFO:1.1:Staging:L_-_standard.yaml scripts: auto_update: true git: https://github.com/openSUSE/openSUSE-release-tools.git @@ -2123,45 +1719,761 @@ pipelines: - script: |- ./scripts/staging-installcheck.py -A $STAGING_API -p $SLFO_1_1_PROJECT -s $STAGING_PROJECT - - Update.000product: + - Enable.images.repo: resources: - - repo-checker + - 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 - cd scripts/gocd + 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 - if ../pkglistgen.py --debug -A $STAGING_API update_and_solve --engine product_composer --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 + SUSE.SLFO.1.1.Staging.M: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:M + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:M_-_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 $SLFO_1_1_PROJECT -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" + 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 + + SUSE.SLFO.1.1.Staging.N: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:N + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:N_-_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 $SLFO_1_1_PROJECT -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" + 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 + + SUSE.SLFO.1.1.Staging.O: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:O + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:O_-_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 $SLFO_1_1_PROJECT -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" + 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 + + SUSE.SLFO.1.1.Staging.P: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:P + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:P_-_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 $SLFO_1_1_PROJECT -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" + 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 + + SUSE.SLFO.1.1.Staging.Q: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:Q + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:Q_-_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 $SLFO_1_1_PROJECT -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" + 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 + + SUSE.SLFO.1.1.Staging.R: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:R + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:R_-_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 $SLFO_1_1_PROJECT -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" + 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 + + SUSE.SLFO.1.1.Staging.S: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:S + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:S_-_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 $SLFO_1_1_PROJECT -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" + 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 + + SUSE.SLFO.1.1.Staging.T: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:T + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:T_-_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 $SLFO_1_1_PROJECT -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" + 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 + + SUSE.SLFO.1.1.Staging.U: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:U + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:U_-_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 $SLFO_1_1_PROJECT -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" + 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 + + SUSE.SLFO.1.1.Staging.V: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:V + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:V_-_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 $SLFO_1_1_PROJECT -s $STAGING_PROJECT - - Build.product: - timeout: 180 + - Enable.images.repo: resources: - staging-bot tasks: - script: |- - minutes=1 - osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build" + osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=images&flag=build" export PYTHONPATH=$PWD/scripts - ## Let the scheduler warm up first - sleep 60 - while osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -E 'statuscount code="(blocked|scheduled|building)"'; do - if [ ${minutes} -gt 180 ]; then - echo "Product is still building after timeout, exiting..." >&2 - exit 1 - fi + while osc -A $STAGING_API api "/build/$STAGING_PROJECT/_result?view=summary&repository=images" | grep 'dirty=.true.'; do sleep 60 - minutes=$(expr $minutes + 1) done - ## Always fail on broken/failed products - if osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -qE 'statuscount code="(broken|failed)"'; then - echo "Some products failed to build, exiting..." >&2 - exit 1 - fi + ./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success + + SUSE.SLFO.1.1.Staging.W: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:W + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:W_-_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 $SLFO_1_1_PROJECT -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" + 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 + + SUSE.SLFO.1.1.Staging.X: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:X + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:X_-_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 $SLFO_1_1_PROJECT -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" + 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 + + SUSE.SLFO.1.1.Staging.Y: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:Y + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:Y_-_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 $SLFO_1_1_PROJECT -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" + 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 + + SUSE.SLFO.1.1.Staging.Z: + environment_variables: + SLFO_1_1_PROJECT: SUSE:SLFO:1.1 + STAGING_PROJECT: SUSE:SLFO:1.1:Staging:Z + STAGING_API: https://api.suse.de + OSC_CONFIG: /home/go/config/oscrc-staging-bot + group: SLFO.1.1.Stagings + lock_behavior: unlockWhenFinished + materials: + stagings: + git: git://botmaster.suse.de/suse-repos.git + auto_update: true + destination: repos + whitelist: + - SUSE:SLFO:1.1:Staging:Z_-_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 $SLFO_1_1_PROJECT -s $STAGING_PROJECT - Enable.images.repo: resources: diff --git a/gocd/slfo-stagings.gocd.yaml.erb b/gocd/slfo-stagings.gocd.yaml.erb index 7df80517b..9683b8045 100644 --- a/gocd/slfo-stagings.gocd.yaml.erb +++ b/gocd/slfo-stagings.gocd.yaml.erb @@ -154,65 +154,7 @@ pipelines: done ./scripts/gocd/report-status.py -A $STAGING_API -p $STAGING_PROJECT -n images:enabled -r standard -s success <% end -%> -<% stagings = %w(A B C D E F G H S V Y) -%> - SUSE.SLFO.1.1.Staging.Weekly.Freeze: - environment_variables: - SLFO_1_1_PROJECT: SUSE:SLFO:1.1 - SLFO_1_1_RING_1_PROJECT: SUSE:SLFO:1.1:Staging:Rings:1-MinimalX - STAGING_API: https://api.suse.de - OSC_CONFIG: /home/go/config/oscrc-staging-bot - group: SLFO.1.1.Stagings - lock_behavior: unlockWhenFinished - timer: - spec: "0 0 0-23 ? * SUN" - materials: - scripts: - auto_update: true - git: https://github.com/openSUSE/openSUSE-release-tools.git - whitelist: - - DO_NOT_TRIGGER - stages: - - Check.Ring.1.Finished: - timeout: 50 - resources: - - staging-bot - tasks: - - script: |- - set -eu - status="$(osc -A $STAGING_API api /build/$SLFO_1_1_RING_1_PROJECT/standard/x86_64?view=status | grep 'code=' | sed -E 's/^.*code="(.*)".*$/\1/')" - echo $SLFO_1_1_RING_1_PROJECT status: "${status}" - if printf '%s' "${status}" | grep -q finished; then - exit 0 - else - exit 1 - fi - - Freeze.stagings: - ## 6 hours (at most 30 minutes per staging) - timeout: 360 - resources: - - staging-bot - tasks: - - script: |- - set -eu - export PYTHONPATH=$PWD - - ## Setup osc staging plugin - 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 - - for letter in <% stagings.each do |letter| %><%= letter %> <% end -%>; do - ## if the staging was frozen today, skip it - if ! osc -A $STAGING_API meta attribute "${SLFO_1_1_PROJECT}:Staging:${letter}" --attribute OSRT:FreezeTime | grep $(date +%Y-%m-%d); then - osc -A $STAGING_API staging freeze -p $SLFO_1_1_PROJECT $letter - else - echo "${SLFO_1_1_PROJECT}:Staging:${letter}" was frozen today, skipping it... - fi - done - ## Tear down osc staging plugin - rm -rf $tempdir +<% stagings = %w(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) -%> <% stagings.each do |letter| %> SUSE.SLFO.1.1.Staging.<%= letter %>: environment_variables: @@ -256,46 +198,6 @@ pipelines: - script: |- ./scripts/staging-installcheck.py -A $STAGING_API -p $SLFO_1_1_PROJECT -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 --engine product_composer --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 - - - Build.product: - timeout: 180 - resources: - - staging-bot - tasks: - - script: |- - minutes=1 - osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build" - export PYTHONPATH=$PWD/scripts - ## Let the scheduler warm up first - sleep 60 - while osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -E 'statuscount code="(blocked|scheduled|building)"'; do - if [ ${minutes} -gt 180 ]; then - echo "Product is still building after timeout, exiting..." >&2 - exit 1 - fi - sleep 60 - minutes=$(expr $minutes + 1) - done - ## Always fail on broken/failed products - if osc -A $STAGING_API api -X GET "/build/$STAGING_PROJECT/_result?view=summary&repository=product&arch=local" | grep -qE 'statuscount code="(broken|failed)"'; then - echo "Some products failed to build, exiting..." >&2 - exit 1 - fi - - Enable.images.repo: resources: - staging-bot