Skip to content

Instantly share code, notes, and snippets.

@andrasKelle
Created September 21, 2021 14:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrasKelle/8a340b9c34583b6dbcf67e8be9552bb4 to your computer and use it in GitHub Desktop.
Save andrasKelle/8a340b9c34583b6dbcf67e8be9552bb4 to your computer and use it in GitHub Desktop.
This is an example of child pipeline generation on Gitlab
import os
from PipelineWriter import PipelineWriter
def get_libs():
libs_path = "lib/java"
libs = os.listdir(libs_path)
return libs
def generator():
with open('child-pipeline-gitlab-ci.yml', 'w+') as f:
f.write(PipelineWriter.parent_jobs_template())
for lib in get_libs():
f.write(PipelineWriter.child_pipeline_job_template(lib))
if __name__ == "__main__":
generator()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment