1

I have a Deploy to IBM Cloud button that deploys 3 git repos and works great except I have a maintenance problem. If I make an edit in one of the repos which impacts how it is built, I have to change the pipeline.yml which exists in another repo, namely in the same repo as my .bluemix\toolchain.yml. I would prefer to have my pipeline.yml files self-contained in the repo they actually pertain to. My toolchain.yml has 3 entries like:

services: dashboard-build: service_id: pipeline parameters: services: - dashboard-repo name: 'dashboard-{{toolchain.name}}' configuration: content: $ref: dashboard.pipeline.yml $refType: text

I tried an absolute path like: ref: https://raw.githubusercontent.com/org/repo/master/.bluemix/dashboard.pipeline.yml but it errored out with

repository contains an invalid template. File not found

Can I change the pipeline's location to be in its own repository or does it have to be co-located with the toolchain.yml?

amadain
  • 2,724
  • 4
  • 37
  • 58

1 Answers1

1

Yes, as you've guessed any files referenced with $ref or $text must be co-located in either the same repo or zip file. We might offer support for referencing and extending another template in the future but there is nothing concrete there yet.

--

Also... $text should be used in preference to $ref and $refType here.

The pipeline's "content" element expects raw text and historically that is why we added $refType: text. However, $ref as specified in JSON Reference explicitly ignores siblings so although we have support for $refType currently it would be better to just use $text going forward.

content: $text: dashboard.pipeline.yml

  • Thanks @simon-kaegi , I will change them to `$text`. But to be clear, do I have to use that method to reference them, or is there an alternative way where I could make the location absolute? – amadain Feb 16 '18 at 08:10
  • Sorry just saw this -- all locations must be relative – Simon Kaegi Apr 09 '18 at 15:14