diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5008e7bd0f42ef3a1336d53459d985c0152b9ff4..c45646522aa041e920f261de1cefed5044958ab5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,19 +1,23 @@ include: - - project: 'to-be-continuous/tools/gitlab-ci' - ref: 'master' - file: '/templates/extract.yml' - - project: 'to-be-continuous/tools/gitlab-ci' - ref: 'master' - file: '/templates/validation.yml' - - project: 'to-be-continuous/kicker' - ref: 'master' - file: '/templates/validation.yml' - - project: 'to-be-continuous/bash' - ref: '3.4' - file: '/templates/gitlab-ci-bash.yml' - - project: 'to-be-continuous/semantic-release' - ref: '3.8' - file: '/templates/gitlab-ci-semrel.yml' + - component: git.code.tecnalia.com/smartdatalab/public/ci-cd-components/gitlab-ci/extract@master + inputs: + extract-script-job-tags: ["docker"] + - component: git.code.tecnalia.com/smartdatalab/public/ci-cd-components/gitlab-ci/validation@master + inputs: + check-links-job-tags: ["docker"] + tbc-check-job-tags: ["docker"] + tbc-check-image: cicd-docker-dev.artifact.tecnalia.com/tbc-check:master + gitlab-ci-lint-job-tags: ["docker"] + - component: git.code.tecnalia.com/smartdatalab/public/ci-cd-components/kicker/validation@master + inputs: + kicker-validation-job-tags: ["docker"] + schema-base-url: "https://git.code.tecnalia.com/api/v4/projects/smartdatalab%2Fpublic%2Fci-cd-components%2Fkicker/repository/files" + - component: git.code.tecnalia.com/smartdatalab/public/ci-cd-components/bash/gitlab-ci-bash@master + inputs: + bash-shellcheck-job-tags: ["docker"] + - component: git.code.tecnalia.com/smartdatalab/public/ci-cd-components/semantic-release/gitlab-ci-semrel@master + inputs: + semantic-release-job-tags: ["docker"] stages: - build diff --git a/README.md b/README.md index 7e8d78a479c20bfb16fe1427959fe1e4d2786f0b..c8e5dce74d760e25eea79b49e7fc1f710b60ebc0 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ They use the following configuration. | `image` / `GITLEAKS_IMAGE` | The Docker image used to run Gitleaks | `registry.hub.docker.com/zricethezav/gitleaks:latest` | | `rules` / `GITLEAKS_RULES` | Gitleaks [configuration rules](https://github.com/zricethezav/gitleaks#configuration) to use (you may also provide your own `.gitleaks.toml` configuration file in your project). | _none_ (uses default rules) | | `args` / `GITLEAKS_ARGS` | [Options](https://github.com/zricethezav/gitleaks/wiki/Options) for a full Gitleaks analysis (on master or develop branches) | `--verbose` | +| `gitleaks-job-tags` / `GITLEAKS_JOB_TAGS` | Tags to be used for selecting runners for the job | `[]` | ### Configuring Gitleaks rules diff --git a/kicker.json b/kicker.json index 0d5bc83cb866f607b7ba16777ee695d9834e09dd..12077a9863de5e59210e6a4b6c2314de38ee05f4 100644 --- a/kicker.json +++ b/kicker.json @@ -21,6 +21,13 @@ "description": "[Options](https://github.com/zricethezav/gitleaks/wiki/Options) for a full Gitleaks analysis (on master or develop branches)", "default": "--verbose", "advanced": true + }, + { + "name": "GITLEAKS_GITLEAKS_JOB_TAGS", + "description": "Tags to be used for selecting runners for the job", + "type": "array", + "default": [], + "advanced": true } ] } diff --git a/templates/gitlab-ci-gitleaks.yml b/templates/gitlab-ci-gitleaks.yml index 320991e485da398a88cd84995b8a1e5843b32a3b..15abf84e12c30aad272422e624c6627bf8ab9419 100644 --- a/templates/gitlab-ci-gitleaks.yml +++ b/templates/gitlab-ci-gitleaks.yml @@ -25,6 +25,11 @@ spec: args: description: '[Options](https://github.com/zricethezav/gitleaks/wiki/Options) for a full Gitleaks analysis (on master or develop branches)' default: '--verbose' + gitleaks-job-tags: + description: tags to filter applicable runners for Sonar job + default: [] + type: array + --- workflow: rules: @@ -244,3 +249,4 @@ gitleaks: - reports/gitleaks.* rules: - !reference [.test-policy, rules] + tags: $[[ inputs.gitleaks-job-tags ]]