Skip to content

Commit

Permalink
Merge pull request #3104 from g7/slfo-staging-wait
Browse files Browse the repository at this point in the history
gocd: slfo-stagings: wait for product to be built before enabling images
  • Loading branch information
dirkmueller committed Jun 11, 2024
2 parents 7999809 + f258efa commit d0b5f1c
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 0 deletions.
121 changes: 121 additions & 0 deletions gocd/slfo-stagings.gocd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ pipelines:
exit 1
fi
- Build.product:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build"
export PYTHONPATH=$PWD/scripts
while ! ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r product; do
sleep 60
done
- Enable.images.repo:
resources:
- staging-bot
Expand Down Expand Up @@ -128,6 +139,17 @@ pipelines:
exit 1
fi
- Build.product:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build"
export PYTHONPATH=$PWD/scripts
while ! ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r product; do
sleep 60
done
- Enable.images.repo:
resources:
- staging-bot
Expand Down Expand Up @@ -197,6 +219,17 @@ pipelines:
exit 1
fi
- Build.product:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build"
export PYTHONPATH=$PWD/scripts
while ! ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r product; do
sleep 60
done
- Enable.images.repo:
resources:
- staging-bot
Expand Down Expand Up @@ -266,6 +299,17 @@ pipelines:
exit 1
fi
- Build.product:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build"
export PYTHONPATH=$PWD/scripts
while ! ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r product; do
sleep 60
done
- Enable.images.repo:
resources:
- staging-bot
Expand Down Expand Up @@ -335,6 +379,17 @@ pipelines:
exit 1
fi
- Build.product:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build"
export PYTHONPATH=$PWD/scripts
while ! ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r product; do
sleep 60
done
- Enable.images.repo:
resources:
- staging-bot
Expand Down Expand Up @@ -404,6 +459,17 @@ pipelines:
exit 1
fi
- Build.product:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build"
export PYTHONPATH=$PWD/scripts
while ! ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r product; do
sleep 60
done
- Enable.images.repo:
resources:
- staging-bot
Expand Down Expand Up @@ -473,6 +539,17 @@ pipelines:
exit 1
fi
- Build.product:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build"
export PYTHONPATH=$PWD/scripts
while ! ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r product; do
sleep 60
done
- Enable.images.repo:
resources:
- staging-bot
Expand Down Expand Up @@ -542,6 +619,17 @@ pipelines:
exit 1
fi
- Build.product:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build"
export PYTHONPATH=$PWD/scripts
while ! ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r product; do
sleep 60
done
- Enable.images.repo:
resources:
- staging-bot
Expand Down Expand Up @@ -611,6 +699,17 @@ pipelines:
exit 1
fi
- Build.product:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build"
export PYTHONPATH=$PWD/scripts
while ! ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r product; do
sleep 60
done
- Enable.images.repo:
resources:
- staging-bot
Expand Down Expand Up @@ -680,6 +779,17 @@ pipelines:
exit 1
fi
- Build.product:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build"
export PYTHONPATH=$PWD/scripts
while ! ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r product; do
sleep 60
done
- Enable.images.repo:
resources:
- staging-bot
Expand Down Expand Up @@ -749,6 +859,17 @@ pipelines:
exit 1
fi
- Build.product:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build"
export PYTHONPATH=$PWD/scripts
while ! ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r product; do
sleep 60
done
- Enable.images.repo:
resources:
- staging-bot
Expand Down
11 changes: 11 additions & 0 deletions gocd/slfo-stagings.gocd.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ pipelines:
exit 1
fi

- Build.product:
resources:
- staging-bot
tasks:
- script: |-
osc -A $STAGING_API api -X POST "/source/$STAGING_PROJECT?cmd=remove_flag&repository=product&flag=build"
export PYTHONPATH=$PWD/scripts
while ! ./scripts/gocd/verify-repo-built-successful.py -A $STAGING_API -p $STAGING_PROJECT -r product; do
sleep 60
done

- Enable.images.repo:
resources:
- staging-bot
Expand Down

0 comments on commit d0b5f1c

Please sign in to comment.