2022-10-25 10:24:08 +00:00
|
|
|
---
|
|
|
|
name: Add comment
|
|
|
|
# yamllint disable-line rule:truthy
|
|
|
|
on:
|
|
|
|
pull_request_target:
|
|
|
|
branches:
|
|
|
|
- devel
|
|
|
|
- "release-v*"
|
|
|
|
types:
|
|
|
|
- labeled
|
2022-10-27 06:29:59 +00:00
|
|
|
|
2023-08-21 08:55:01 +00:00
|
|
|
permissions:
|
|
|
|
pull-requests: write
|
2023-04-12 10:55:58 +00:00
|
|
|
|
2023-08-21 08:55:01 +00:00
|
|
|
jobs:
|
|
|
|
branch-k8s-selection:
|
|
|
|
runs-on: ubuntu-latest
|
2023-08-17 05:37:47 +00:00
|
|
|
|
2023-08-21 08:55:01 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-08-14 08:35:42 +00:00
|
|
|
branch: [release-v3.11, release-v3.12, devel]
|
|
|
|
k8s: ["1.26", "1.27", "1.28", "1.29", "1.30", "1.31"]
|
2023-08-21 08:55:01 +00:00
|
|
|
exclude:
|
2024-08-14 08:35:42 +00:00
|
|
|
# Run only last 3 support releases on devel and 3.12
|
2024-02-14 16:34:38 +00:00
|
|
|
- k8s: "1.26"
|
2024-08-14 08:35:42 +00:00
|
|
|
branch: "release-v3.12"
|
2024-04-25 15:09:38 +00:00
|
|
|
- k8s: "1.26"
|
2024-02-14 16:34:38 +00:00
|
|
|
branch: "devel"
|
2024-08-14 08:35:42 +00:00
|
|
|
- k8s: "1.27"
|
|
|
|
branch: "release-v3.12"
|
|
|
|
- k8s: "1.27"
|
|
|
|
branch: "devel"
|
|
|
|
- k8s: "1.28"
|
|
|
|
branch: "release-v3.12"
|
|
|
|
- k8s: "1.28"
|
|
|
|
branch: "devel"
|
2024-04-25 15:12:40 +00:00
|
|
|
# Ceph-CSI <= 3.11 was released before Kubernetes 1.30
|
|
|
|
- k8s: "1.30"
|
|
|
|
branch: "release-v3.11"
|
2024-08-14 08:35:42 +00:00
|
|
|
# Ceph-CSI <= 3.11 was released before Kubernetes 1.31
|
|
|
|
- k8s: "1.31"
|
|
|
|
branch: "release-v3.11"
|
2024-01-03 17:17:58 +00:00
|
|
|
|
2023-08-22 08:42:50 +00:00
|
|
|
# watch out, matrix.branch can not be used in this if-statement :-/
|
2023-08-21 08:55:01 +00:00
|
|
|
if: >
|
|
|
|
(github.event.label.name == 'ok-to-test' &&
|
2023-08-22 08:42:50 +00:00
|
|
|
github.event.pull_request.merged != true)
|
2023-04-12 10:55:58 +00:00
|
|
|
|
2023-08-21 08:55:01 +00:00
|
|
|
steps:
|
|
|
|
- name: >
|
|
|
|
Add comment to trigger external storage tests for Kubernetes
|
|
|
|
${{ matrix.k8s }}
|
2023-08-22 11:16:59 +00:00
|
|
|
if: ${{ github.base_ref == matrix.branch }}
|
2024-01-29 20:27:32 +00:00
|
|
|
uses: peter-evans/create-or-update-comment@v4
|
2023-08-17 05:37:47 +00:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.CEPH_CSI_BOT_TOKEN }}
|
|
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
|
|
body: |
|
2023-08-21 08:55:01 +00:00
|
|
|
/test ci/centos/k8s-e2e-external-storage/${{ matrix.k8s }}
|
2023-08-17 05:37:47 +00:00
|
|
|
|
2023-08-21 08:55:01 +00:00
|
|
|
- name: >
|
|
|
|
Add comment to trigger helm E2E tests for Kubernetes
|
|
|
|
${{ matrix.k8s }}
|
2023-08-22 11:16:59 +00:00
|
|
|
if: ${{ github.base_ref == matrix.branch }}
|
2024-01-29 20:27:32 +00:00
|
|
|
uses: peter-evans/create-or-update-comment@v4
|
2022-10-27 06:29:59 +00:00
|
|
|
with:
|
2023-06-01 16:27:22 +00:00
|
|
|
token: ${{ secrets.CEPH_CSI_BOT_TOKEN }}
|
2022-10-27 06:29:59 +00:00
|
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
|
|
body: |
|
2023-08-21 08:55:01 +00:00
|
|
|
/test ci/centos/mini-e2e-helm/k8s-${{ matrix.k8s }}
|
2022-10-27 06:29:59 +00:00
|
|
|
|
2023-08-21 08:55:01 +00:00
|
|
|
- name: Add comment to trigger E2E tests for Kubernetes ${{ matrix.k8s }}
|
2024-01-29 20:27:32 +00:00
|
|
|
uses: peter-evans/create-or-update-comment@v4
|
2023-08-22 11:16:59 +00:00
|
|
|
if: ${{ github.base_ref == matrix.branch }}
|
2023-01-30 14:52:35 +00:00
|
|
|
with:
|
2023-06-01 16:27:22 +00:00
|
|
|
token: ${{ secrets.CEPH_CSI_BOT_TOKEN }}
|
2023-01-30 14:52:35 +00:00
|
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
|
|
body: |
|
2023-08-21 08:55:01 +00:00
|
|
|
/test ci/centos/mini-e2e/k8s-${{ matrix.k8s }}
|
2023-01-30 14:52:35 +00:00
|
|
|
|
2023-08-21 08:55:01 +00:00
|
|
|
any-branch-k8s-version:
|
|
|
|
runs-on: ubuntu-latest
|
2023-04-12 10:55:58 +00:00
|
|
|
|
2023-08-21 08:55:01 +00:00
|
|
|
if: >
|
|
|
|
(github.event.label.name == 'ok-to-test' &&
|
|
|
|
github.event.pull_request.merged != true)
|
2023-08-17 05:37:47 +00:00
|
|
|
|
2023-08-21 08:55:01 +00:00
|
|
|
steps:
|
2022-10-25 10:24:08 +00:00
|
|
|
- name: Add comment to trigger cephfs upgrade tests
|
2024-01-29 20:27:32 +00:00
|
|
|
uses: peter-evans/create-or-update-comment@v4
|
2022-10-25 10:24:08 +00:00
|
|
|
with:
|
2023-06-01 16:27:22 +00:00
|
|
|
token: ${{ secrets.CEPH_CSI_BOT_TOKEN }}
|
2022-10-25 10:24:08 +00:00
|
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
|
|
body: |
|
|
|
|
/test ci/centos/upgrade-tests-cephfs
|
|
|
|
|
|
|
|
- name: Add comment to trigger rbd upgrade tests
|
2024-01-29 20:27:32 +00:00
|
|
|
uses: peter-evans/create-or-update-comment@v4
|
2022-10-25 10:24:08 +00:00
|
|
|
with:
|
2023-06-01 16:27:22 +00:00
|
|
|
token: ${{ secrets.CEPH_CSI_BOT_TOKEN }}
|
2022-10-25 10:24:08 +00:00
|
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
|
|
body: |
|
|
|
|
/test ci/centos/upgrade-tests-rbd
|
2023-02-20 08:57:56 +00:00
|
|
|
|
2023-08-21 08:55:01 +00:00
|
|
|
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:
|
2023-02-20 08:57:56 +00:00
|
|
|
- name: remove ok-to-test-label after commenting
|
2023-11-13 20:08:59 +00:00
|
|
|
uses: actions/github-script@v7
|
2023-02-20 08:57:56 +00:00
|
|
|
with:
|
2023-06-01 16:27:22 +00:00
|
|
|
github-token: ${{ secrets.CEPH_CSI_BOT_TOKEN }}
|
2023-02-20 08:57:56 +00:00
|
|
|
script: |
|
|
|
|
github.rest.issues.removeLabel({
|
2023-02-20 10:16:23 +00:00
|
|
|
issue_number: context.issue.number,
|
2023-02-20 08:57:56 +00:00
|
|
|
owner: context.repo.owner,
|
|
|
|
repo: context.repo.repo,
|
|
|
|
name: ["ok-to-test"]
|
|
|
|
})
|