diff --git a/README.md b/README.md index 56b00775a0efe7335d7759092a55e01b3533ea0c..2da5897a8a9cd98784b5ba862f19ba42a3f01101 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ It uses the following variable: | Input / Variable | Description | Default value | | -------------------------------- | ------------------------------- | --------------------------- | | `build-args` / `RUST_BUILD_ARGS` | Arguments used by the build job | `build --with-default-args` | +| `node-build-job-tags` / `NODE_BUILD_JOB_TAGS` | Tags to be used for selecting runners for the job | [] | ### SonarQube analysis @@ -96,6 +97,7 @@ It uses the following variables: | `lint-image` / `RUST_LINT_IMAGE` | The Docker image used to run the lint tool | `rust-lint:latest` | | `lint-disabled` / `RUST_LINT_DISABLED` | Set to `true` to disable the `lint` analysis | _none_ (enabled) | | `lint-args` / `RUST_LINT_ARGS` | Lint [options and arguments](link-to-the-cli-options) | `--serevity=medium` | +| `node-lint-job-tags` / `NODE_LINT_JOB_TAGS` | Tags to be used for selecting runners for the job | [] | ### `rust-depcheck` job @@ -107,6 +109,7 @@ It uses the following variables: | ---------------------------------------- | ----------------------------------------------------------------- | ---------------------- | | `depcheck-image` / `RUST_DEPCHECK_IMAGE` | The Docker image used to run the dependency check tool | `rust-depcheck:latest` | | `depcheck-args` / `RUST_DEPCHECK_ARGS` | Dependency check [options and arguments](link-to-the-cli-options) | _none_ | +| `node-depcheck-job-tags` / `NODE_DEPCHECK_JOB_TAGS` | Tags to be used for selecting runners for the job | [] | ### `rust-publish` job @@ -120,6 +123,7 @@ It uses the following variables: | `publish-args` / `RUST_PUBLISH_ARGS` | Arguments used by the publish job | `publish --with-default-args` | | :lock: `RUST_PUBLISH_LOGIN` | Login to use to publish | **must be defined** | | :lock: `RUST_PUBLISH_PASSWORD` | Password to use to publish | **must be defined** | +| `node-publish-job-tags` / `NODE_PUBLISH_JOB_TAGS` | Tags to be used for selecting runners for the job | [] | ### Secrets management diff --git a/kicker.json b/kicker.json index 53620a8ffb4e73a71662c98fbb9b1aaef90a1987..d3d29c0aaac359f571e6058dec5435fbd831a5b3 100644 --- a/kicker.json +++ b/kicker.json @@ -18,8 +18,15 @@ "description": "Arguments used by the build job", "default": "build --with-default-args", "advanced": true + }, + { + "name": "RUST_RUST_BUILD_JOB_TAGS", + "description": "Tags to be used for selecting runners for the job", + "type": "array", + "default": [], + "advanced": true } - ], +], "features": [ { "id": "lint", @@ -37,6 +44,13 @@ "description": "Lint [options and arguments](link-to-the-cli-options)", "default": "--serevity=medium", "advanced": true + }, + { + "name": "RUST_RUST_LINT_JOB_TAGS", + "description": "Tags to be used for selecting runners for the job", + "type": "array", + "default": [], + "advanced": true } ] }, @@ -54,6 +68,13 @@ "name": "RUST_DEPCHECK_ARGS", "description": "Dependency check [options and arguments](link-to-the-cli-options)", "advanced": true + }, + { + "name": "RUST_RUST_DEPCHECK_JOB_TAGS", + "description": "Tags to be used for selecting runners for the job", + "type": "array", + "default": [], + "advanced": true } ] }, @@ -78,6 +99,13 @@ "name": "RUST_PUBLISH_PASSWORD", "description": "Password to use to publish", "secret": true + }, + { + "name": "RUST_RUST_PUBLISH_JOB_TAGS", + "description": "Tags to be used for selecting runners for the job", + "type": "array", + "default": [], + "advanced": true } ] } diff --git a/templates/gitlab-ci-rust.yml b/templates/gitlab-ci-rust.yml index d838124a2807f2ed7171e3a6c376b77dc334bc95..f3c690eb4f945d10212b4dbf829203eefba3d4d7 100644 --- a/templates/gitlab-ci-rust.yml +++ b/templates/gitlab-ci-rust.yml @@ -45,6 +45,23 @@ spec: publish-args: description: Arguments used by the publish job default: publish --with-default-args + rust-build-job-tags: + description: tags to filter applicable runners for rust-build job + type: array + default: [] + rust-lint-job-tags: + description: tags to filter applicable runners for rust-lint job + type: array + default: [] + rust-depcheck-job-tags: + description: tags to filter applicable runners for rust-depcheck job + type: array + default: [] + rust-publish-job-tags: + description: tags to filter applicable runners for rust-publish job + type: array + default: [] + --- # default workflow rules: Merge Request pipelines workflow: @@ -418,6 +435,7 @@ rust-build: paths: - build/ - reports/ + tags: $[[ inputs.rust-build-job-tags ]] # (example) linter job rust-lint: @@ -441,6 +459,7 @@ rust-lint: when: never # .test-policy rules - !reference [.test-policy, rules] + tags: $[[ inputs.rust-lint-job-tags ]] # (example) dependency check job rust-depcheck: @@ -459,6 +478,7 @@ rust-depcheck: # all other cases: manual & non-blocking - when: manual allow_failure: true + tags: $[[ inputs.rust-depcheck-job-tags ]] # (example) publish job activated on env ($RUST_PUBLISH_ENABLED), with required $RUST_PUBLISH_LOGIN and $RUST_PUBLISH_PASSWORD env verification rust-publish: @@ -480,3 +500,4 @@ rust-publish: - if: '$CI_COMMIT_REF_NAME =~ $INTEG_REF || $CI_COMMIT_REF_NAME =~ $PROD_REF' when: manual allow_failure: true + tags: $[[ inputs.rust-publish-job-tags ]]