Collection of configuration files that enable CI flows for Tinybird projects.
- Templates for popular CI tools like GitHub Actions and GitLab CI
- Include external YAML file in your CI/CD jobs
- Define variables
TB_HOST
,ADMIN_TOKEN
andDATA_PROJECT_DIR
- Extend
.run_ci
,.cleanup_ci_branch
andrun_cd
with rules and variables
include: "https://raw.githubusercontent.com/tinybirdco/ci/main/.gitlab/ci_cd.yaml"
.ci_config_rules:
- &ci_config_rule
if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- .gitlab-ci.yml
- shared_internal_test/*
- &ci_cleanup_rule
if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: always
.ci_variables:
variables: &ci_variables
TB_HOST: "<tinybird_api_endpoint_region_ie_https://api.tinybird.co>"
ADMIN_TOKEN: "<tinybird_admin_token>"
DATA_PROJECT_DIR: "<your_data_project_directory>"
.cd_config_rules:
- &cd_config_rule
if: $CI_COMMIT_BRANCH == '$CI_DEFAULT_BRANCH' && $CI_PIPELINE_SOURCE == 'merge_request_event'
.cd_variables:
variables: &cd_variables
TB_HOST: "<tinybird_api_endpoint_region_ie_https://api.tinybird.co>"
ADMIN_TOKEN: "<tinybird_admin_token>"
DATA_PROJECT_DIR: "<your_data_project_directory>"
run_ci:
extends: .run_ci
rules:
- *ci_config_rule
variables:
<<: *ci_variables
cleanup_ci:
extends: .cleanup_ci_branch
rules:
- *ci_cleanup_rule
variables:
<<: *ci_variables
run_cd:
extends: .run_cd
rules:
- *cd_config_rule
variables:
<<: *cd_variables
- Using inputs
tb_host
andadmin_token
- Call reusable job workflow => See example here