diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f4f1fa3c2cf561fe0aa631a9a3114f4f8658c8cb..4cb49bc56e8ad5cdb352266729c587d3d11d9640 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: registry.gitlab.com/gbenguria/tbc-check:main + 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 7614c45e4b80a626dc015ae0aed90d1dd82f056b..e3123646726724941b8f741035011e2730a0e488 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,10 @@ This job allows building your Python project [distribution packages](https://pac It is bound to the `build` stage, it is **disabled by default** and can be enabled by setting `$PYTHON_PACKAGE_ENABLED` to `true`. +| Input / Variable | Description | Default value | +| ------------------------ | ---------------------------------- | ----------------- | +| `py-package-job-tags` / `PY_PACKAGE_JOB_TAGS` | Tags to be used for selecting runners for the job | `[]` | + ### Lint jobs #### `py-lint` job @@ -159,6 +163,7 @@ It is bound to the `build` stage, and uses the following variables: | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | | `pytest-enabled` / `PYTEST_ENABLED` | Set to `true` to enable the `pytest` job | _none_ (disabled) | | `pytest-args` / `PYTEST_ARGS` | Additional [pytest](https://docs.pytest.org/en/stable/usage.html) or [pytest-cov](https://github.com/pytest-dev/pytest-cov#usage) CLI options | _none_ | +| `py-pytest-job-tags` / `PY_PYTEST_JOB_TAGS` | Tags to be used for selecting runners for the job | `[]` | :information_source: use a `.coveragerc` file at the root of your Python project to control the coverage settings. @@ -295,6 +300,7 @@ This job **disabled by default** and runs [Ruff](https://docs.astral.sh/ruff/) o | `ruff-enabled` / `RUFF_ENABLED` | Set to `true` to enable ruff job | _none_ (disabled) | | `ruff-args` / `RUFF_ARGS` | Additional [Ruff Linter CLI options](https://docs.astral.sh/ruff/configuration/#full-command-line-interface) | _none_ | | `ruff-ext-exclude` / `RUFF_EXT_EXCLUDE` | Define [extend-exclude](https://docs.astral.sh/ruff/settings/#extend-exclude) files | _.venv,.cache_ | +| `py-ruff-job-tags` / `PY_RUFF_JOB_TAGS` | Tags to be used for selecting runners for the job | `[]` | :warning: Ruff can replace isort, Black, Bandit, Pylint and much more. [More info](https://github.com/astral-sh/ruff/blob/main/docs/faq.md#which-tools-does-ruff-replace). @@ -388,6 +394,7 @@ The release job is bound to the `publish` stage, appears only on production and | `repository-url` / `PYTHON_REPOSITORY_URL`| Target PyPI repository to publish packages | _[GitLab project's PyPI packages repository](https://docs.gitlab.com/ee/user/packages/pypi_repository/)_ | | `PYTHON_REPOSITORY_USERNAME`| Target PyPI repository username credential | `gitlab-ci-token` | | :lock: `PYTHON_REPOSITORY_PASSWORD`| Target PyPI repository password credential | `$CI_JOB_TOKEN` | +| `py-release-job-tags` / `PY_RELEASE_JOB_TAGS` | Tags to be used for selecting runners for the job | `[]` | #### Setuptools tip diff --git a/kicker.json b/kicker.json index 86ea97e3f6313ff6635e3ec49c32f0581fd6213c..198396fcae25cb3bc6e7500a55889438e6838825 100644 --- a/kicker.json +++ b/kicker.json @@ -58,7 +58,16 @@ "id":"package", "name":"package", "description":"This job allows building your Python project [distribution packages](https://packaging.python.org/en/latest/glossary/#term-Distribution-Package).", - "enable_with": "PYTHON_PACKAGE_ENABLED" + "enable_with": "PYTHON_PACKAGE_ENABLED", + "variables": [ + { + "name": "PY_PACKAGE_JOB_TAGS", + "description": "Tags to be used for selecting runners for the job", + "type": "array", + "default": [], + "advanced": true + } + ] }, { "id": "pylint", @@ -101,6 +110,13 @@ "name": "PYTEST_ARGS", "description": "Additional [pytest](https://docs.pytest.org/en/stable/usage.html) or [pytest-cov](https://github.com/pytest-dev/pytest-cov#usage) CLI options", "advanced": true + }, + { + "name": "PY_PYTEST_JOB_TAGS", + "description": "Tags to be used for selecting runners for the job", + "type": "array", + "default": [], + "advanced": true } ] }, @@ -239,6 +255,13 @@ "description": "Target PyPI repository password credential", "secret": true, "default": "$CI_JOB_TOKEN" + }, + { + "name": "PY_RELEASE_JOB_TAGS", + "description": "Tags to be used for selecting runners for the job", + "type": "array", + "default": [], + "advanced": true } ] }, @@ -269,6 +292,13 @@ "name": "RUFF_EXT_EXCLUDE", "description": "Define [extend-exclude](https://docs.astral.sh/ruff/settings/#extend-exclude) files", "advanced": true + }, + { + "name": "PY_RUFF_JOB_TAGS", + "description": "Tags to be used for selecting runners for the job", + "type": "array", + "default": [], + "advanced": true } ] },