3

I have a repo of which I'm looking at various folders at and building different things in each repo.

Since a lot of the steps are similar I was trying to streamline things a bit and use output mapping to "rename" the dir to a common name, but it doesn't seem to behave. All I can get is an error: "unknown artifact source: repo"

(A snippet of) My pipeline is:

resources:
# I have more of these, one for each path I'm interested in but not shown here.
- name: repo-folder--11.1--common
  type: git
  source:
    uri: git@github.com:myorg/project
    branch: concourse-pipeline
    private_key: {{github_private_key}}
    paths:
      - 11.1/common

jobs:
- name: common-image-build
  plan:
  - get: repo-folder--11.1--common
    output_mapping:
      repo-folder--11.1--common: repo
    trigger: true
  - get: centos-docker-image
  - task: generate-tag
    file: repo/task-generate-tag.yml
    params:
      prefix: "1.11-"

I was hoping that the output_mapping on my get would let me refer to that git repo via a simpler name ("repo") in this build plan, but it doesn't seem to.

Am I missing some way of achieving this or is this a bug/design decision?

Ash Berlin-Taylor
  • 3,879
  • 29
  • 34

1 Answers1

5

No need to use output_mapping, resource get has its own way of "renaming", by specifying the resource.

resources:
- name: repo-folder--11.1--common
  type: git
  source:
    uri: git@github.com:myorg/project
    branch: concourse-pipeline
    private_key: {{github_private_key}}
    paths:
      - 11.1/common

jobs:
- name: common-image-build
  plan:
  - get: repo
    resource: repo-folder--11.1--common
    trigger: true
  - get: centos-docker-image
  - task: generate-tag
    file: repo/task-generate-tag.yml
    params:
      prefix: "1.11-"
materialdesigner
  • 1,492
  • 10
  • 13