I've been having some issues with bamboo when trying to create a tar file.
I've got a simple task which runs the command current build directory:
/bin/tar -czf archive.tgz ./
I do this to create an archive of my current code so that I can upload it to the target server.
When the plan runs, it always fails with the following:
11-Jun-2015 14:34:17 Beginning to execute external process for build 'Project - Plan - Default Job #20 (BV3-WWW-JOB1-20)'\n ... running command line: \n/bin/tar -czf archive.tgz ./\n ... in: /opt/atlassian/bamboo-home/xml-data/build-dir/BV3-WWW-JOB1\
11-Jun-2015 14:34:21 /bin/tar: .: file changed as we read it
11-Jun-2015 14:34:21 Failing task since return code of [/bin/tar -czf archive.tgz ./] was 1 while expected 0
11-Jun-2015 14:34:21 Finished task 'Create Tar File' with result: Failed
11-Jun-2015 14:34:21 Running post build plugin 'Artifact Copier'
11-Jun-2015 14:34:21 Publishing an artifact: Archive
11-Jun-2015 14:34:22 Finished publishing of artifact Shared artifact: [Archive], pattern: [archive.tgz] in 0s
As you can see, it produces the archive.tgz and it even publishes the artifact. but the plan still fails because of the tar command.
I just don't know what to do about it at this point.
Any help is appreciated.
AH! I answered my own question. but I'm going to leave this here in case anyone else has this problem.
The issue was not bamboo. Bamboo was simply doing what it's supposed to do. The issue was with my tar command.
I was running tar in the build directory ./ while righting the tar file to the build directory (I was producing ./archive.tgz)
The tar command saw that there was a change to a file in ./ and threw an error. To fix this I simply specified the files I wanted to add to my archive:
/bin/tar -czf archive.tgz ./dir1/ ./dir2/ ./dir3/.... etc
I hope maybe this helps someone in the future.
Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs