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:
<span>stages</span><span>:</span> <span>-</span> <span>jobs</span><span>:</span> <span>-</span> <span>scripts</span><span>:</span> <span>-</span> rm -rf ${bamboo.build.working.directory}<br> - #your scripts here<br>
Ok Thanks
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
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.
It looks like you're new here. Sign in or register to get started.