README.md

    Jsonnet Project Template

    This project template serves as a starting point to use GitLab CI Dynamic Child Pipelines with Jsonnet to generate complex gitlab-ci.yml files at runtime.

    Jsonnet provides functions, variables, loops, and conditionals that allow for fully paramaterized YAML configuration.

    Components

    This project contains two files:

    .gitlab-ci.jsonnet

    This simple example contains a Jsonnet script that generates two unique jobs for a scenario where you might want to dynamically generate your testing jobs:

    • rspec
    • rspec 2

    local param_job serves as the template for all the jobs. It also takes advantage of the parallel keyword to create two copies of each job.

    From here you can use Jsonnet to generate CI YAML in an easy way. To learn more about Jsonnet, check out its tutorial or getting started guide. The complete GitLab CI YAML Configuration Reference is also available to help.

    .gitlab-ci.yml

    The .gitlab-ci.yml file contains two important jobs:

    jsonnet

    This job fetches the Jsonnet package from apk and runs it to create the generated-config.yml, which is the emitted YAML. The generated-config.yml is stored as an artifact to make it available for triggering in the next step.

    trigger-tests

    trigger-tests is a trigger job responsible for starting the dynamic child pipeline. It takes the YAML artifact from the previous jsonnet job and starts the dynamic pipeline.

    项目简介

    An example showing how to use Jsonnet with GitLab dynamic child pipelines

    发行版本

    当前项目没有发行版本

    贡献者 2

    J Jason Yavorska @Jason Yavorska
    K Kamil Trzcinski @Kamil Trzcinski

    开发语言

    • Jsonnet 100.0 %