From 9506a760dcc5c8b7253afc65d61f3d5439dc9c2c Mon Sep 17 00:00:00 2001 From: "Benguria Elguezabal, Gorka" <gorka.benguria@tecnalia.com> Date: Mon, 20 May 2024 23:04:17 +0200 Subject: [PATCH] adapts to tecnalia --- .gitlab-ci.yml | 34 ++++++++++++++++++-------------- README.md | 1 + kicker.json | 7 +++++++ templates/gitlab-ci-gitleaks.yml | 6 ++++++ 4 files changed, 33 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5008e7b..c456465 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 7e8d78a..c8e5dce 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 0d5bc83..12077a9 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 320991e..15abf84 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 ]] -- GitLab