ci: auto-detect storage provider
If the PR follows our contribution guideline https://rook.io/docs/rook/master/development-flow.html#commit-structure and then the PR title contains for example "ceph: add a feature", then the CI will run the ceph storage integration tests. Closes: https://github.com/rook/rook/issues/5612 Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
1 parent
99e6277d9a
commit
4e8f7e725d
2 files changed
+11
-6
No files matched your search
@@ -186,6 +186,8 @@ These options should **not** be used if there are any changes to code which is s
|
||||
storage providers. If there is any risk of affecting another storage provider, all tests should
|
||||
be executed in the CI.
|
||||
|
||||
> Note that if the pull request title follows Rook's [contribution guidelines](https://rook.io/docs/rook/master/development-flow.html#commit-structure), the CI will automatically run the appropriate test scenario. For example if a pull request title is "ceph: add a feature", then the tests for the Ceph storage provider will run.
|
||||
|
||||
### [test full]
|
||||
|
||||
In master and release builds, all test suites will run on all supported versions of K8s.
|
||||
|
||||
Vendored
+9
-6
@@ -51,18 +51,21 @@ pipeline {
|
||||
def changed_files = list.filename
|
||||
echo ("changed files are: ${changed_files}")
|
||||
|
||||
// Get PR title
|
||||
def title = evaluateJson(json,'${json.title}')
|
||||
|
||||
// extract which specific storage provider to test
|
||||
if (body.contains("[test cassandra]")) {
|
||||
if (body.contains("[test cassandra]") || title.contains("cassandra:")) {
|
||||
env.testProvider = "cassandra"
|
||||
} else if (body.contains("[test ceph]")) {
|
||||
} else if (body.contains("[test ceph]") || title.contains("ceph:")) {
|
||||
env.testProvider = "ceph"
|
||||
} else if (body.contains("[test cockroachdb]")) {
|
||||
} else if (body.contains("[test cockroachdb]") || title.contains("cockroachdb:")) {
|
||||
env.testProvider = "cockroachdb"
|
||||
} else if (body.contains("[test edgefs]")) {
|
||||
} else if (body.contains("[test edgefs]") || title.contains("edgefs:")) {
|
||||
env.testProvider = "edgefs"
|
||||
} else if (body.contains("[test nfs]")) {
|
||||
} else if (body.contains("[test nfs]") || title.contains("nfs:")) {
|
||||
env.testProvider = "nfs"
|
||||
} else if (body.contains("[test yugabytedb]")) {
|
||||
} else if (body.contains("[test yugabytedb]") || title.contains("yugabytedb:")) {
|
||||
env.testProvider = "yugabytedb"
|
||||
} else if (body.contains("[test]")) {
|
||||
env.shouldBuild = "true"
|
||||
|
||||
Reference in new issue
Block a user