mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-18 04:10:22 +00:00
fe050557c9
Signed-off-by: Niels de Vos <ndevos@ibm.com>
127 lines
3.8 KiB
YAML
127 lines
3.8 KiB
YAML
---
|
|
name: Add comment
|
|
# yamllint disable-line rule:truthy
|
|
on:
|
|
pull_request_target:
|
|
branches:
|
|
- devel
|
|
- "release-v*"
|
|
types:
|
|
- labeled
|
|
|
|
permissions:
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
branch-k8s-selection:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
branch: [release-v3.9, release-v3.10, devel]
|
|
k8s: ["1.25", "1.26", "1.27", "1.28", "1.29"]
|
|
exclude:
|
|
# the next Ceph-CSI version will not be tested with old Kubernetes
|
|
- k8s: "1.26"
|
|
branch: "devel"
|
|
- k8s: "1.25"
|
|
branch: "devel"
|
|
- k8s: "1.25"
|
|
branch: "release-v3.10"
|
|
|
|
# Ceph-CSI <= 3.9 was released before Kubernetes 1.28
|
|
- k8s: "1.28"
|
|
branch: "release-v3.9"
|
|
|
|
# Ceph-CSI <= 3.10 was released before Kubernetes 1.29
|
|
- k8s: "1.29"
|
|
branch: "release-v3.9"
|
|
- k8s: "1.29"
|
|
branch: "release-v3.10"
|
|
|
|
# watch out, matrix.branch can not be used in this if-statement :-/
|
|
if: >
|
|
(github.event.label.name == 'ok-to-test' &&
|
|
github.event.pull_request.merged != true)
|
|
|
|
steps:
|
|
- name: >
|
|
Add comment to trigger external storage tests for Kubernetes
|
|
${{ matrix.k8s }}
|
|
if: ${{ github.base_ref == matrix.branch }}
|
|
uses: peter-evans/create-or-update-comment@v4
|
|
with:
|
|
token: ${{ secrets.CEPH_CSI_BOT_TOKEN }}
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
body: |
|
|
/test ci/centos/k8s-e2e-external-storage/${{ matrix.k8s }}
|
|
|
|
- name: >
|
|
Add comment to trigger helm E2E tests for Kubernetes
|
|
${{ matrix.k8s }}
|
|
if: ${{ github.base_ref == matrix.branch }}
|
|
uses: peter-evans/create-or-update-comment@v4
|
|
with:
|
|
token: ${{ secrets.CEPH_CSI_BOT_TOKEN }}
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
body: |
|
|
/test ci/centos/mini-e2e-helm/k8s-${{ matrix.k8s }}
|
|
|
|
- name: Add comment to trigger E2E tests for Kubernetes ${{ matrix.k8s }}
|
|
uses: peter-evans/create-or-update-comment@v4
|
|
if: ${{ github.base_ref == matrix.branch }}
|
|
with:
|
|
token: ${{ secrets.CEPH_CSI_BOT_TOKEN }}
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
body: |
|
|
/test ci/centos/mini-e2e/k8s-${{ matrix.k8s }}
|
|
|
|
any-branch-k8s-version:
|
|
runs-on: ubuntu-latest
|
|
|
|
if: >
|
|
(github.event.label.name == 'ok-to-test' &&
|
|
github.event.pull_request.merged != true)
|
|
|
|
steps:
|
|
- name: Add comment to trigger cephfs upgrade tests
|
|
uses: peter-evans/create-or-update-comment@v4
|
|
with:
|
|
token: ${{ secrets.CEPH_CSI_BOT_TOKEN }}
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
body: |
|
|
/test ci/centos/upgrade-tests-cephfs
|
|
|
|
- name: Add comment to trigger rbd upgrade tests
|
|
uses: peter-evans/create-or-update-comment@v4
|
|
with:
|
|
token: ${{ secrets.CEPH_CSI_BOT_TOKEN }}
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
body: |
|
|
/test ci/centos/upgrade-tests-rbd
|
|
|
|
remove-label:
|
|
runs-on: ubuntu-latest
|
|
|
|
# run after the other jobs
|
|
needs:
|
|
- branch-k8s-selection
|
|
- any-branch-k8s-version
|
|
|
|
if: >
|
|
(github.event.label.name == 'ok-to-test' &&
|
|
github.event.pull_request.merged != true)
|
|
|
|
steps:
|
|
- name: remove ok-to-test-label after commenting
|
|
uses: actions/github-script@v7
|
|
with:
|
|
github-token: ${{ secrets.CEPH_CSI_BOT_TOKEN }}
|
|
script: |
|
|
github.rest.issues.removeLabel({
|
|
issue_number: context.issue.number,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
name: ["ok-to-test"]
|
|
})
|