Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.82 KiB
Newer Older
checkpf:
  # https://docs.gitlab.com/ee/ci/pipelines/multi_project_pipelines.html
  trigger:
    project: sys/ubicast-environment
    strategy: depend
Baptiste DE RENZO's avatar
Baptiste DE RENZO committed
    branch: main
  # Sends the current branch to the ubicast-environment triggered pipeline as a variable
  variables:
    ANSIBLE_BRANCH: $CI_COMMIT_BRANCH
    DEPLOY_STD: $DEPLOY_STD
    DEPLOY_HA: $DEPLOY_HA
    DESTROY_STD: $DESTROY_STD
    DESTROY_HA: $DESTROY_HA
    INVENTORY_VAR_REPOS_UBICAST_PACKAGES_DOMAIN: $INVENTORY_VAR_REPOS_UBICAST_PACKAGES_DOMAIN
    INVENTORY_VAR_REPOS_UBICAST_PACKAGES_TOKEN: $INVENTORY_VAR_REPOS_UBICAST_PACKAGES_TOKEN
  # Register the job in a resource group to prevent having multiple running pipelines in parallel
  resource_group: deployment
    # Only triggers the pipeline if it's launched manually from the GitLab webinterface
    - if: $CI_PIPELINE_SOURCE == "web"
    # Only triggers the pipeline if it's launched by a scheduled job
    - if: $CI_PIPELINE_SOURCE == "schedule"
    # Only if push on the main branch
    - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "main"
Baptiste DE RENZO's avatar
Baptiste DE RENZO committed
# Do not work as expected, failed with error : 
#  > Downstream pipeline can not be created, Pipeline will not run for the selected trigger.
#  > The rules configuration prevented any jobs from being added to the pipeline.
#lint:
#  # https://docs.gitlab.com/ee/ci/pipelines/multi_project_pipelines.html
#  trigger:
#    project: sys/ubicast-environment
#    strategy: depend
#    branch: main
#  # Sends the current branch to the ubicast-environment triggered pipeline as a variable
#  variables:
#    ANSIBLE_BRANCH: $CI_COMMIT_BRANCH
#    DEPLOY_STD: "false"
#    DEPLOY_HA: "false"
#  resource_group: deployment
#  rules:
#    # Only if push in a branch other than main
#    - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH != "main"