CI: prevent running of scheduled cleanup task if multiple Gitlab CI/CD schedules are set

This commit is contained in:
Leonid Pliushch 2019-03-25 17:14:15 +02:00
parent 072f060ce7
commit 597dbb72ed
1 changed files with 4 additions and 1 deletions

View File

@ -81,7 +81,10 @@ repository-cleanup:
only:
- schedules
script:
- ./scripts/package_uploader.sh --cleanup $(cd ./packages; echo *)
- |
if [ -n "$SCHEDULED_REPOSITORY_CLEANUP" ]; then
./scripts/package_uploader.sh --cleanup $(cd ./packages; echo *)
fi
retry:
max: 2
when: