summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorErnesto Puerta <37327689+epuertat@users.noreply.github.com>2022-08-05 10:56:36 +0200
committerErnesto Puerta <epuertat@redhat.com>2022-08-10 13:09:52 +0200
commita92bf26f056cac2d76e9b5fed9ac0d219170837f (patch)
treee0e01fa12743a49a7a7059f45542374e5fddf3d1 /.github
parentMerge pull request #47470 from tchaikov/wip-win32-silence-warning (diff)
downloadceph-a92bf26f056cac2d76e9b5fed9ac0d219170837f.tar.xz
ceph-a92bf26f056cac2d76e9b5fed9ac0d219170837f.zip
.github/workflows: add create-backport action
Currently there's a cron job in a teuthology VM running a script to find all trackers in needs-backports and to create their corresponding backport trackers. This is done through the [Backport Bot](https://tracker.ceph.com/users/12172) Redmine account. This PR intends to run this cron job task as a periodic Github Action. Signed-off-by: Ernesto Puerta <37327689+epuertat@users.noreply.github.com> Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/create-backport-trackers.yml50
1 files changed, 50 insertions, 0 deletions
diff --git a/.github/workflows/create-backport-trackers.yml b/.github/workflows/create-backport-trackers.yml
new file mode 100644
index 00000000000..b3525d9e94e
--- /dev/null
+++ b/.github/workflows/create-backport-trackers.yml
@@ -0,0 +1,50 @@
+---
+name: Create backport trackers for trackers in "Pending Backport" state
+on:
+ # To manually trigger this: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
+ workflow_dispatch:
+ inputs:
+ issues:
+ description: 'whitespace-separated list of issue numbers'
+ type: string
+ default: ''
+ debug:
+ description: '--debug: Show debug-level messages'
+ default: false
+ type: boolean
+ resolveParent:
+ description: '--resolve-parent: Resolve parent issue if all backports resolved/rejected'
+ default: false
+ type: boolean
+ force:
+ description: >
+ --force: When issue numbers provided, process them even if not in
+ 'Pending Backport' status.
+ Otherwise, process all issues in 'Pending Backport' status even if
+ already processed (tag 'backport_processed' added)'
+ default: false
+ type: boolean
+ dryRun:
+ description: '--dry-run: Do not write anything to Redmine'
+ default: false
+ type: boolean
+ schedule:
+ # Every 5 minutes: https://crontab.guru/every-5-minutes
+ - cron: '*/5 * * * *'
+jobs:
+ create-backports:
+ runs-on: ubuntu-latest
+ if: github.ref == 'refs/heads/main'
+ steps:
+ - uses: Bhacaz/checkout-files@e3e34e7daef91a5f237485bb88a260aee4be29dd
+ with:
+ files: src/script/backport-create-issue src/script/requirements.backport-create-issue.txt
+ - uses: actions/setup-python@v4
+ with:
+ python-version: '>=3.6'
+ cache: 'pip'
+ cache-dependency-path: src/script/requirements.backport-create-issue.txt
+ - run: pip install -r src/script/requirements.backport-create-issue.txt
+ - run: python3 src/script/backport-create-issue ${{ inputs.debug && '--debug' || '' }} ${{ inputs.resolveParent && '--resolve-parent' || '' }} ${{ inputs.force && '--force' || '' }} ${{ inputs.dryRun && '--dry-run' || '' }} ${{ inputs.issues }}
+ env:
+ REDMINE_API_KEY: ${{ secrets.REDMINE_API_KEY_BACKPORT_BOT }}