Skip to content
Snippets Groups Projects
Commit b8a9ea26 authored by Benguria Elguezabal, Gorka's avatar Benguria Elguezabal, Gorka
Browse files

adds job tags

parent c1505b72
Branches
No related tags found
No related merge requests found
Pipeline #164711 failed
......@@ -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
......
......@@ -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
}
]
}
......
......@@ -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 ]]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment