Skip to content

Instantly share code, notes, and snippets.

@aviadlevy
Created December 19, 2021 08:16
Show Gist options
  • Save aviadlevy/9b6f30e3da779c2fc790dc5cfa1e3122 to your computer and use it in GitHub Desktop.
Save aviadlevy/9b6f30e3da779c2fc790dc5cfa1e3122 to your computer and use it in GitHub Desktop.
.gitlab-ci with dynamic pipelines
image: $CI_REGISTRY_IMAGE/$CI_IMAGE_NAME:latest
services:
- docker:dind
stages:
- generate-ci
- triggers
generate-ci:
stage: generate-ci
script:
- python3 scripts/generate_ci.py
artifacts:
paths:
- ci-out
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- when: always
parents:
stage: triggers
trigger:
include:
- artifact: ci-out/middle-ci.yml
job: generate-ci
strategy: depend
variables:
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
PARENT_JOB_NAME: generate-ci
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- when: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment