Skip to content
Snippets Groups Projects
manifest-integration.yml 2.56 KiB
Newer Older
# --------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------
  MANIFEST_FILE: "default.xml"
  # The BB_RECIPE_NAME is used for projects referenced in the SRCREV file
  # to match the repository and the bitbake recipe name.
  # We set it here to none, as every project needing it
  # has to specify it in its own gitlab-ci.yml file.
  # The BB_RECIPE_NAME is passed to the python scripts below anyway, but not
  # used for projects referenced in the manifest file.
  BB_RECIPE_NAME: none

workflow:
  rules:
    # Explicitly allow externally triggered pipelines in every case
    - if: $CI_PIPELINE_SOURCE == "pipeline" || $CI_PIPELINE_SOURCE == "api"
    # Do not run pipelines on forked projects.
    # The pipelines would not work anyway because of the users permissions.
    # There are two cases catched here:
    # 1. The project is forked into someones gitlab namespace and a MR to
    #    include a change into this forked project is created. In this case
    #    is the CI_PROJECT_ROOT_NAMESPACE not seco-ne but the
    #    namespace the fork lives in.
    # 2. The MR from the forked project is created to merge the change into this
    #    the project in the seco-ne namespace (customer sending
    #    change to us). Here the the IDs used below differ.
    #
    - if: $CI_PROJECT_ROOT_NAMESPACE == "seco-ne"
        && $CI_MERGE_REQUEST_SOURCE_PROJECT_ID == $CI_MERGE_REQUEST_PROJECT_ID

# --------------------------------------------------------------------------------------
# Stage: infrastructure
# --------------------------------------------------------------------------------------
generate-pipelines:
  extends:
    - .infrastructure
    # The job generation script implicitly passes the OS environment to the template, so
    # that the template has access to all GitLab CI variables. Hence there is no need
    # to explicitly pass any of them as command line arguments.
    - .gitlab-ci/scripts/generate_job_from_template.py
        --template=.gitlab-ci/manifest-integration-pipelines.yml.jinja2
        > manifest-integration-pipelines.yml
    expire_in: 4 weeks
      - manifest-integration-pipelines.yml
trigger-pipelines:
  stage: infrastructure
  needs:
    - generate-pipelines
    include:
      - artifact: manifest-integration-pipelines.yml
        job: generate-pipelines
yamllint:
  extends:
    - .yamllint