Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
Plugin's icon
14.2K

pipeline-trigger-merge pipeline-trigger-merge

Merge a pipeline spec and a list of triggers (files or directories) to create a codefresh full pipeline. Directories are processed recursively. Unknown files are simply ignored.

arguments

  • IMAGE - Image name for step's image.
  • IMAGE_TAG - Image tag for step's image.
  • ONLY_CHANGED - Loop through changed files from git instead of applying a single spec.
  • REGISTRY - Docker Registry for step's image.
  • SPEC - The name of the file containing the pipeline spec.
  • TRIGGERS - A space separated list of trigger files and/or folders.
  • TRIGGERS_SUBDIR - The subdirectory that holds a pipeline's triggers if looping. Defaults to 'triggers'.
    MergeTriggersIntoPipeline:
  title: Merge the triggers into the pipeline spec
  type: pipeline-trigger-merge
  arguments:
    SPEC: spec.yml
    TRIGGERS: trig1.yml ./trigger_dir trig2.yml

  
    MergeTriggersIntoPipelines:
  title: Merge the triggers into the pipeline spec(s)
  type: pipeline-trigger-merge
  working_directory: '${{Clone}}'
  arguments:
    SPEC: spec.yml
    ONLY_CHANGED: true
    TRIGGERS_SUBDIR: triggers

  
github.com
Laurent Rochette
Jan 24, 2023