Commit 13812abc authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

ci: support custom TBC group as an alternative CI/CD configuration

This change restores the working build for basic forking workflow on gitlab.com.
parent 5f420fd4
Loading
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
# Alternative CI/CD configuration file when using TBC in a self-managed GitLab with a custom TBC root group (different from the default "to-be-continuous")
# ℹ️ The CI/CD configuration file can be selected in your project: Settings > CI/CD > General Pipelines > CI/CD Configuration File.
# ⚠️ Requires that the TBC_NAMESPACE variable be set as a server instance variable (recommended), group variable, or project variable.
# included templates
include:
  # $TBC_NAMESPACE is a group variable; can be globally overridden
  # Docker template
  - component: "$CI_SERVER_FQDN/$TBC_NAMESPACE/docker/gitlab-ci-docker@8"
    inputs:
      healthcheck-disabled: true
      build-args: "--cache-ttl=6h"
      prod-publish-strategy: "auto"
      release-extra-tags: "latest \\g<major>.\\g<minor>\\g<build> \\g<major>\\g<build>"
  # Python template
  - component: "$CI_SERVER_FQDN/$TBC_NAMESPACE/python/gitlab-ci-python@9"
    inputs:
      image: "docker.io/library/python:3.12-slim"
      ruff-enabled: true
      pytest-enabled: true
      package-enabled: true
      publish-enabled: true
      semgrep-disabled: true
  # semantic-release template
  - component: $CI_SERVER_FQDN/$TBC_NAMESPACE/semantic-release/gitlab-ci-semrel@4
    inputs:
      # disable semrel for all synch'd repositories
      release-disabled: true
      auto-release-enabled: true

test-help-cmd:
  image:
    name: $DOCKER_SNAPSHOT_IMAGE
    entrypoint: [""]
  stage: package-test
  script:
    - tbc-check --help
+5 −8
Original line number Diff line number Diff line
# Default CI/CD configuration file
# ℹ️ If you're using TBC in a self-managed GitLab with a custom TBC root group, use .gitlab-ci-namespaced.yml instead
# included templates
include:
  # $TBC_NAMESPACE is a group variable; can be globally overridden
  # Docker template
  - component: "$CI_SERVER_FQDN/$TBC_NAMESPACE/docker/gitlab-ci-docker@8"
  - component: "$CI_SERVER_FQDN/to-be-continuous/docker/gitlab-ci-docker@8"
    inputs:
      healthcheck-disabled: true
      build-args: "--cache-ttl=6h"
      prod-publish-strategy: "auto"
      release-extra-tags: "latest \\g<major>.\\g<minor>\\g<build> \\g<major>\\g<build>"
  # Python template
  - component: "$CI_SERVER_FQDN/$TBC_NAMESPACE/python/gitlab-ci-python@9"
  - component: "$CI_SERVER_FQDN/to-be-continuous/python/gitlab-ci-python@9"
    inputs:
      image: "docker.io/library/python:3.12-slim"
      ruff-enabled: true
@@ -18,16 +19,12 @@ include:
      publish-enabled: true
      semgrep-disabled: true
  # semantic-release template
  - component: $CI_SERVER_FQDN/$TBC_NAMESPACE/semantic-release/gitlab-ci-semrel@4
  - component: $CI_SERVER_FQDN/to-be-continuous/semantic-release/gitlab-ci-semrel@4
    inputs:
      # disable semrel for all synch'd repositories
      release-disabled: true
      auto-release-enabled: true

variables:
  # Default value; can be globally overridden
  TBC_NAMESPACE: "to-be-continuous"

test-help-cmd:
  image:
    name: $DOCKER_SNAPSHOT_IMAGE