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,559,739
Community Members
 
Community Events
185
Community Groups

Clean working directory in yaml bamboo specs

Omar Herrera
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Mar 03, 2018

There is a default option like clean working directory on ui task or  for clean build in source code checkout on ui task?

Whe need clean working directory  before each build without make a line script for this.

1 answer

0 votes
Jeyanthan I
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 05, 2018

Hi Omar,

YAML Specs has limited options that are meant for simplest configurations. We do not have an explicit option as you see in the (YAML documentationlike a "Clean working directory after each build" option that you see in Bamboo UI under Plan configuration -> Miscellaneous tab.

You will have to start your definition with script task like below to have a clean working directory:

stages:
  - jobs:
      - scripts:
          - rm -rf ${bamboo.build.working.directory}
- #your scripts here
Omar Herrera
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Mar 05, 2018

Ok Thanks

Omar Herrera
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Mar 09, 2018

Hi @Jeyanthan I I tried your solution but I got a new issue.

1. It's on the beginning of my script the source code was deleted and the build plan fails.

2. I put them at the end of my script and in this case the artifacts was deleted.

I don't have a clearly workaround for this.

Thanks

Jeyanthan I
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 07, 2018

Is it possible for you to move the artifacts to a different location before you had to clean your working directory? This way, you avoid artifacts from being deleted.

@Jeyanthan I I cannot find a feature request for this. Will this be ever added to YAML specs?

Jeyanthan I
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 01, 2018 • edited

Hi @Eduard Babayan and @Omar Herrera,

I have created a feature request here - BAM-19918. Please feel free to upvote and leave your comments there.

Omar Herrera
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jun 01, 2018

Excellent @Jeyanthan I I'm already voted the issue.

Deleted user Sep 18, 2018

+1

Jeyanthan I
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 18, 2019

Hi Omar,

Just so you know, this feature is now implemented in the upcoming version - Bamboo 6.9.0

Omar Herrera
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Feb 18, 2019

Thanks @Jeyanthan I  that's a very good news.

@Jeyanthan I I went to vote on BAM-19918 and noted that it's closed with a resolution of fixed.

Looking at the YAML spec reference 6.10.3 here there does not appear to be a way to configure this task to clean after the artefacts are created for the current job.

Can you please clarify if this was updated and thus how to produce a YAML file where the job cleans AFTER the job is completed?

I was also struggling with this.

You need to look under Miscellaneous plugins in the dokumentation

https://docs.atlassian.com/bamboo-specs-docs/6.10.3/specs.html?yaml&_ga=2.234635350.932361163.1582540858-222470763.1543839768#miscellaneous-plugins

 

Here it is described:

  other:
    clean-working-dir: true

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events