Skip to content
Snippets Groups Projects
Commit 08d03b91 authored by Kevin Daudt's avatar Kevin Daudt :computer:
Browse files

ci: use dynamic downstream pipelines

This gives us more flexibiity with regards to the job configuration. One
job generates the job configuration which then triggers a downstream
pipeline.
parent 7256870f
No related branches found
No related tags found
1 merge request!75958ci: use dynamic downstream pipelines
Pipeline #275976 passed
Pipeline: aports

#275977

    ...@@ -7,10 +7,10 @@ variables: ...@@ -7,10 +7,10 @@ variables:
    GIT_DEPTH: "500" GIT_DEPTH: "500"
    REGISTRY: registry.alpinelinux.org REGISTRY: registry.alpinelinux.org
    # only rune pipelines for merge requests or when tags are pushed (for triggers)
    workflow: workflow:
    rules: rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_PIPELINE_SOURCE == "merge_request_event"
    - if: $CI_PIPELINE_SOURCE == "pipeline" || $CI_PIPELINE_SOURCE == "parent_pipeline"
    - if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
    lint: lint:
    ...@@ -26,6 +26,32 @@ lint: ...@@ -26,6 +26,32 @@ lint:
    - docker-alpine - docker-alpine
    - x86_64 - x86_64
    generate-build-jobs:
    stage: verify
    image:
    name: $REGISTRY/alpine/infra/docker/alpine-gitlab-ci:latest
    script:
    - pipeline generate .gitlab-ci.yml .gitlab/job-config.yaml >.gitlab/build-jobs.yaml
    artifacts:
    paths:
    - .gitlab/build-jobs.yaml
    tags:
    - docker-alpine
    - x86_64
    rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
    build-jobs:
    stage: verify
    needs:
    - generate-build-jobs
    trigger:
    include:
    - artifact: .gitlab/build-jobs.yaml
    job: generate-build-jobs
    rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
    .build: .build:
    stage: verify stage: verify
    image: image:
    ...@@ -41,7 +67,7 @@ lint: ...@@ -41,7 +67,7 @@ lint:
    expire_in: 1 day expire_in: 1 day
    when: always when: always
    rules: rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_PIPELINE_SOURCE == "parent_pipeline"
    build-x86_64: build-x86_64:
    extends: .build extends: .build
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment