diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f3cd4d0c5a85e8b5696c0f747aa6fd5c7695c1b3..a26078dcaa55e0b7f85b57bfccd73ec2fc2dfcf3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,33 +1,41 @@ +# variables in the GitLab CI/CD variables: + # GITLAB_TOKEN to support the semantic-release + # DOCKER_AUTH_CONFIG to support the usage of private docker images as job docker image + # TMPL_RELEASE_ENABLED to enable the semantic-release job + # TBC_NAMESPACE: smartdatalab/public/ci-cd-components + include: - - component: git.code.tecnalia.com/smartdatalab/public/ci-cd-components/gitlab-ci/extract@master + - component: $CI_SERVER_FQDN/$TBC_NAMESPACE/gitlab-ci/extract@master inputs: extract-script-job-tags: ["docker"] - - component: git.code.tecnalia.com/smartdatalab/public/ci-cd-components/gitlab-ci/validation@master + - component: $CI_SERVER_FQDN/$TBC_NAMESPACE/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 + - component: $CI_SERVER_FQDN/$TBC_NAMESPACE/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 + yajsv-image: "cicd-docker-dev.artifact.tecnalia.com/yajsv:latest" + - component: $CI_SERVER_FQDN/$TBC_NAMESPACE/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 + - component: $CI_SERVER_FQDN/$TBC_NAMESPACE/semantic-release/gitlab-ci-semrel@master inputs: semantic-release-job-tags: ["docker"] - -stages: - - build - - publish + shellcheck-files: "*.sh" variables: GITLAB_CI_FILES: "templates/gitlab-ci-gitleaks.yml" BASH_SHELLCHECK_FILES: "*.sh" GIT_STRATEGY: clone +stages: + - build + - publish + semantic-release: rules: # on production branch(es): auto if SEMREL_AUTO_RELEASE_ENABLED diff --git a/CHANGELOG.md b/CHANGELOG.md index c5f77a3a0bdf66eca8bad84faeb155a6c7138f52..968fcba4372afc125824260000e752a12213dfd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,3 @@ -## [2.5.2](https://git.code.tecnalia.com/smartdatalab/public/ci-cd-components/gitleaks/compare/2.5.1...2.5.2) (2024-05-20) - - -### Bug Fixes - -* **workflow:** disable MR pipeline from prod & integ branches ([3d43c7f](https://git.code.tecnalia.com/smartdatalab/public/ci-cd-components/gitleaks/commit/3d43c7f96d6e623bf20df17f0302b2dbe22b6fa2)) - ## [2.5.2](https://gitlab.com/to-be-continuous/gitleaks/compare/2.5.1...2.5.2) (2024-05-05) diff --git a/README.md b/README.md index c8e5dce74d760e25eea79b49e7fc1f710b60ebc0..95630063cb3477bd87d407af5871f289e220c2c7 100644 --- a/README.md +++ b/README.md @@ -9,17 +9,17 @@ When run on other branches, Gitleaks will run a quick analysis on the current br ## Usage -This template can be used both as a [CI/CD component](https://docs.gitlab.com/ee/ci/components/#use-a-component-in-a-cicd-configuration) +This template can be used both as a [CI/CD component](https://docs.gitlab.com/ee/ci/components/#use-a-component) or using the legacy [`include:project`](https://docs.gitlab.com/ee/ci/yaml/index.html#includeproject) syntax. ### Use as a CI/CD component -Add the following to your `gitlab-ci.yml`: +Add the following to your `.gitlab-ci.yml`: ```yaml include: # 1: include the component - - component: gitlab.com/to-be-continuous/gitleaks/gitlab-ci-gitleaks@2.5.2 + - component: $CI_SERVER_FQDN/to-be-continuous/gitleaks/gitlab-ci-gitleaks@2.6.0 # 2: set/override component inputs inputs: args: "--no-banner" # ⚠ this is only an example @@ -27,13 +27,13 @@ include: ### Use as a CI/CD template (legacy) -Add the following to your `gitlab-ci.yml`: +Add the following to your `.gitlab-ci.yml`: ```yaml include: # 1: include the template - project: 'to-be-continuous/gitleaks' - ref: '2.5.2' + ref: '2.6.0' file: '/templates/gitlab-ci-gitleaks.yml' variables: diff --git a/kicker.json b/kicker.json index 12077a9863de5e59210e6a4b6c2314de38ee05f4..384280c2c3d330dca6208a66e09d1a1dd0a3bb33 100644 --- a/kicker.json +++ b/kicker.json @@ -19,7 +19,7 @@ { "name": "GITLEAKS_ARGS", "description": "[Options](https://github.com/zricethezav/gitleaks/wiki/Options) for a full Gitleaks analysis (on master or develop branches)", - "default": "--verbose", + "default": "--verbose --redact", "advanced": true }, { diff --git a/templates/gitlab-ci-gitleaks.yml b/templates/gitlab-ci-gitleaks.yml index 15abf84e12c30aad272422e624c6627bf8ab9419..0ccd5c59eed4c7b3bdf02acc787f3134c74c556e 100644 --- a/templates/gitlab-ci-gitleaks.yml +++ b/templates/gitlab-ci-gitleaks.yml @@ -24,7 +24,7 @@ spec: default: '' args: description: '[Options](https://github.com/zricethezav/gitleaks/wiki/Options) for a full Gitleaks analysis (on master or develop branches)' - default: '--verbose' + default: '--verbose --redact' gitleaks-job-tags: description: tags to filter applicable runners for Sonar job default: [] @@ -230,7 +230,7 @@ gitleaks: entrypoint: [""] services: - name: "$TBC_TRACKING_IMAGE" - command: ["--service", "gitleaks", "2.5.2"] + command: ["--service", "gitleaks", "2.6.0"] stage: test needs: [] variables: