Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,987
Community Members
 
Community Events
176
Community Groups

scp task supported in YAML specs?

Dear Support

We would like to use the scp task in our YAML specs setup.

If we export a current bamboo plan to YAML specs, we see the scp task part code like this:

- scp:
host: ${bamboo.repos.server}
artifact:
name: Linux - example.tar.gz
source-plan: BRC-example
destination-path: /data/example
authentication:
username: example-user
password: example-password
description: Copy Tar.gz File to Remote Location

 

However if we want to setup a yaml repository with the scp task again in our bamboo server(followed this tutorial: https://confluence.atlassian.com/bamboo/tutorial-bamboo-specs-yaml-stored-in-bitbucket-server-941616819.html)

we are getting the following error message:

Bamboo YAML import failed: Document structure is incorrect: Linux Install / tasks / [1]: Unknown task type scp

Could it be possible that the scp task is not "supported" yet in the yaml specs code? Or somehow the linked specs repository does not recognize the scp task.

2 answers

It seems that the value of source-plan in artifact was not defined correctly.

source-plan: BRC-example
 now it is working properly with defining the correct value of the source-plan.

I used ${bamboo.planKey} before, but it seems that this value is not supported yet in source-plan of the artifact

https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html

so the question that remains, how can the ${bamboo.planKey}  or any other variable be used in the source-plan parameter of the artifact ?

- scp:
...
artifact:
name: Linux - example.tar.gz
source-plan: BRC-example

 the source-plan only accepts hard-coded value's.

It's not possible I'm afraid. At UI we use dropdown with plans available for plan admin which doesn't fit free text field required for variable definition.

Can you please describe your use case when runtime value of variable should be used for task to reference artifact.

We have a lot of Bamboo plans in the same project which requires almost the same tasks.

The only main difference between those bamboo plans is the plan-key and plan-name.

An example how a bamboo yaml spec files looks like from a specific bamboo plan:

---
version: 2
plan:
project-key: HPC
key: BTPMC
name: BCS.testpackage Master Container

repositories:
- BCS.testpackage Master:
scope: global

#Stages in plan
stages:
- Build:
description: Builds and tests the Package
manual: false
final: false
jobs:
- Linux Build Master
- Linux Install:
manual: true
final: false
jobs:
- Linux Install

variables:
package-name: BCS.testpackage
bamboo-password: !include 'vars/bamboo-pw.yaml'
destination-path: /data/repos/R/src/contrib/4.0
project-key-plan: HPC-BTPMC
Linux Build Master: !include 'jobs/linux-build-master.yaml'
Linux Install: !include 'jobs/linux-install.yaml'

...

 

So we would like to consolidate the Linux Build Master and Linux Install stage.

All those stages are the same between those bamboo plans, so it would be handy if ${bamboo.planKey} can work in the source-plan in the artifact. Obviously the planKey is different between the several bamboo plan, so we would like to avoid to duplicate all those stages with a hard-coded plan-key values

0 votes

What's your Bamboo version?

Bamboo version 8.1.9 build 80117 - 22 Jul 22

Let me check if I can reproduce it locally and get back to you today

I was not able to reproduce issue with Bamboo 8.1.9 and given Yaml specs file

---
version: 2
plan:
project-key: TEST
key: SCP
name: SCP Specs
stages:
- Default Stage:
manual: false
final: false
jobs:
- Default Job
Default Job:
key: JOB1
tasks:
- scp:
host: localhost
local-path: '*.txt'
destination-path: /
authentication:
username: admin
password: BAMSCRT@0@0@Eb9vSe09uLtSdaMz8X/FrA==
artifact-subscriptions: []
triggers: []
branches:
create: manually
delete: never
...

Please report issue to support.atlassian.com to get help from Support engineers

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events