Hi folks,
I have a Plan that builds successfully and then tries to publish a artifact that is ~200MB in size.
But I always get the following error:
- Publishing an artifact: myFile.pkg - Unable to publish artifact [myFile.pkg]: null - Finished publishing of artifact Shared artifact: [myFile.pkg], pattern: [*.pkg] anchored at: [/tmp/package_build] in 0s
Inside "/tmp/package_build" is nothing else that the .pkg file
I tripple checked the typing of the path and if the file exists. It does.
Why is bamboo unable to publish the artifact?
Some research tell me that it is not the file size.
Community moderators have prevented the ability to post new answers.
Well was easy in the end.
Bamboo doesn't like absolute path to artifact (/tmp/package_build). Changed it to a relative one fixed it.
I just don't know why it says "null" if he follows the path from its working directory it should have said "file or directory doesn't exist".
Hi Marcel, what change did you make to the path? Did you use /tmp/package_build? or a different path? Please paste the location. I am new and its unclear to me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi otsile kesianye,
the problem at all is that bamboo needs to be told how to get to the artifact based from its current working directory.
You could do it like me and just let bamboo copy the artifact into its working directory by a inline script where you can use an absolute path like you did and the bamboo internal variable for the working directory
(eg. "cp -r /tmp/package_build/* ${bamboo.build.working.directory}/")
Or you do the complex way that is likely to break if there is only one directory that changes.
Lets assume the working directory of bamboo is "/tmp/bamboo/builds/PLAN-KEY". To get your artifacts from "/tmp/package_build" you need to tell bamboo how to get there based on its current position in the directory tree. So your needed path would be "../../../package_build". With the double dots you tell Bamboo to go backwards in the tree by one directory. So with the 3 double dots you go back to "/tmp" and can go forward into "package_build".
I hope it is understandable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Marcel. I am still lost though.
I tried creating a script task and then creating artifacts as explained below but it did not work.
https://answers.atlassian.com/questions/13413955
Can you send me a picture of;
Its a bit frustrating there are no How-to videos for Bambo.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To get used to artifacts.
Create a script task and paste in the following
file="my_artifact.txt" touch $file echo "foo" > $file echo "bar" >> $file echo " - - - " echo $file
This will create a file named "my_artifact.txt" inside the working directory of the bamboo agent and write two lines to it "foo" in the first and "bar" in the second line. The last part just creates a short line and then prints out what is written in the file.
Now create a new definition for a artifact with the following.
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.