git-resource icon indicating copy to clipboard operation
git-resource copied to clipboard

add params.branch to in/get for use in an "across" step

Open Houlistonm opened this issue 2 years ago • 2 comments

use case:

jobs:
  - name: set-feature-pipelines
    plan:
      - in_parallel:
          - get: automation-image
            params:
              unpack: true
          - get: ytt
            params:
              globs:
                - ytt-linux-amd64
          - get: cli-tool-feature-branches
            trigger: true
      - load_var: branches
        file: cli-tool-feature-branches/branches.json
      - across:
          - var: branch
            values: ((.:branches))
        do:
        - get: cli-tools
          trigger: true
          get_params:
            branch: ((.:branch.name))
        - task: render-pipeline
          image: automation-image
          file: cli-tools/ci/tasks/render-ytt/task.yml
          params:
            YTT_FLAGS: |
              -f cli-tools/ci/cli_tools.yml
              -f cli-tools/ci/cli_tools_vars.yml
        - set_pipeline: package-cli-tools
          file: ytt-output/output.yml
          instance_vars: {feature: ((.:branch.groups.feature))}
          vars: {branch: ((.:branch.name))}

Houlistonm avatar Jan 18 '23 15:01 Houlistonm