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.
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 documentation) like 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
Ok Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Excellent @Jeyanthan I I'm already voted the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
+1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Omar,
Just so you know, this feature is now implemented in the upcoming version - Bamboo 6.9.0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Jeyanthan I that's a very good news.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was also struggling with this.
You need to look under Miscellaneous plugins in the dokumentation
Here it is described:
other:
clean-working-dir: true
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.