You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I have build plans working with bamboo-specs and i would like to pull out the common parts into an include. I have read and re-read the specs and i cant work it out
bamboo-specs
| - bamboo.yml
| - Services
| - build-ServiceA.yml
| - build-ServiceB.yml
| - Common
| - build-job.yml
---
!include 'Services\build-ServiceA.yml'
---
!include 'Services\build-ServiceB.yml'
folder\build-ServiceA.yml-> working
---
version: 2
plan:
project-key: XXX
key: XXXXX
name: Build Service
stages:
- Build:
jobs:
- Build-Service
Build-Service:
key: JOB1
tasks:
- clean
- script:
interpreter: WINDOWS_POWER_SHELL
scripts:
- |-
Set-Location ./${bamboo.solution}
dotnet restore -v q
description: Restore
- script:
interpreter: WINDOWS_POWER_SHELL
scripts:
- |-
Set-Location ./${bamboo.solution}/${bamboo.serviceFolder}
dotnet publish -c Release -v q -o ${bamboo.working.directory}/packages
description: publish
artifacts:
- name: ${bamboo.solution}
location: packages
pattern: '**/*'
shared: true
required: true
artifact-subscriptions: []
variables:
solution: service
serviceFolder: folder
triggers: []
repositories:
- Repo
branches:
create:
for-new-branch: (release|feature)/.+
delete:
after-deleted-days: 1
after-inactive-days: 30
link-to-jira: true
What i would like to do is move the Build-Service job into a common include file. Looking at the spec information on includes i should be able to do this. However when i make the changes
folder\build-ServiceA.yml-> error
Bamboo YAML import failed: Invalid format of the YAML file: Include file ..\COMMON\build-job.yaml does not exist
---
version: 2
plan:
project-key: XXX
key: XXXXX
name: Build Service
stages:
- Build:
jobs:
- Build-Service
Build-Service: !include '..\common\build-job.yml'
triggers: []
repositories:
- Repo
branches:
create:
for-new-branch: (release|feature)/.+
delete:
after-deleted-days: 1
after-inactive-days: 30
link-to-jira: true
common\build-job.yml
tasks:
- clean
- script:
interpreter: WINDOWS_POWER_SHELL
scripts:
- |-
Set-Location ./${bamboo.solution}
dotnet restore -v q
description: Restore
- script:
interpreter: WINDOWS_POWER_SHELL
scripts:
- |-
Set-Location ./${bamboo.solution}/${bamboo.serviceFolder}
dotnet publish -c Release -v q -o ${bamboo.working.directory}/packages
description: publish
artifacts:
- name: ${bamboo.solution}
location: packages
pattern: '**/*'
shared: true
required: true
artifact-subscriptions: []
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.