I have my first, very simple build and deployment flows I'm trying to produce. The build is successful but the deploy is not. It dies with:
Unable to download artifact Shared artifact: [Script_art], pattern: [*.*] anchored at: [.]
Looks like I basically have no idea how to configure my artifact correctly. If I go to my default job in my build project I defined an artifact with a location of "." and a copy pattern of "*.*". The artifact is selected in the Artifact Download task in the Deploy project but always fails with the above message.
Since the "build" is really just a Bitbucket pull and a follow up powershell script to copy the files to a different location there should not be much to dig through to to fix... but I don't know what I'm doing here so any help would be appreciated!
It seems like it depends on the order of the create/edit of artifacts and deployment plan. After any artifact configuration in a build plan has been changed, edit all of the tasks in your deployment plans using this artifacts and save them - no changes need to be made, just click the save button.
This solved it for me.
With the configuration you have in place for your artifact, Bamboo would consider all files in the build's target directory for inclusion in the artifact. It will not consider subdirectories, because in this case the copy pattern should be "**/*".
You said you use Powershell to move files around - are they still in the "target" directory? If you're having trouble figuring this out, please feel free to open a ticket at support.atlassian.com.
@Tim Crall - yes I see my artifact "Script_art" in the Artiifacts tab of my "Default Job" under my "Default Stage" in my build "Build projects / DSC / Sysconfig".
@Christian Glockner [Atlassian] This "build" is only the checkout of a bunch of powershell scripts and then a follow up task that copies them (via a powershell command) to a second directory. I am out of town for a few days so when I get back I will try this build.
@Christian Glockner [Atlassian]
Still getting an error when I try using the **/* pattern. The files are not moved but copied to a second directory and I verified they are still there:
PS C:\Users\user001\bamboo-agent-home\xml-data\build-dir> ls
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 4/24/2016 12:13 PM 786433-851969
d----- 4/23/2016 6:09 PM DSC-SYS-JOB1
d----- 4/24/2016 12:13 PM repositoryData
PS C:\Users\user001\bamboo-agent-home\xml-data\build-dir> cd .\DSC-SYS-JOB1
PS C:\Users\usr001\bamboo-agent-home\xml-data\build-dir\DSC-SYS-JOB1> ls
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 4/23/2016 6:09 PM 522 dsc_pushover_alert.ps1
-a---- 4/23/2016 6:09 PM 2031 Get-NewAesKey.psm1
-a---- 4/23/2016 6:09 PM 151 README.md
Unable to download artifact Shared artifact: [Script_art], pattern: [**/*] anchored at: [.]
Im seeing the same result. I have a build which produces the artifact, and I can see it in the Artifacts tab on the completed build. When I attempt to deploy this artifact using a deployment plan, I get
Unable to download artifact Shared artifact: [buildPlanArtifact], pattern: [*.tar.gz] anchored at: [target]
Very frustrating. My only workaround was to do this on another identical agent, but now its happening there.
We just ran into this bug and @Peter Lindroos fix was the only thing we could get to work. Killing the environment in question was not sufficient -- had to be the full deployment plan.
I believe we entered the bad state when an artifact was renamed in the plan and deployment. One of the renamed artifacts was the one being barfed on.
I was having similar issue, i cloned the existing plan having the issue and gave a different name to the new plan. That seemed to do the trick and the issue is fixed now. Though this does not answer the cause of the issue in the original plan, i'm able to move on and continue with my work. If you are still having issues, please note down the steps of the original plan and create a brand new plan (without using clone method) and use the steps noted down for original plan to create the new one. Another user Peter above suggested creating new plan as well. Cloning of the plan - IF works, saves time of not having to add the build steps manually for the new plan.
There definitely seems to be some bug when using "Artifact download" task with the "Build" plans. I have No issues if i'm using the exact same (i.e. exact same configuration) for the "Artifact download" task in the "Deployment" projects within Bamboo. I'm consistently seeing this, which results in the error reported in this thread. Not sure if anyone else have used this task ("Artifact download") in the "Build" section and has that working without issues OR were able to resolve the issue there. Any suggestions to resolve this, is much appreciated. Thank You.
I may be able to provide another piece to the puzzle here.
I have a simple plan with two jobs, and one job (the default) is disabled.
It turns out, artifact download was trying to copy artifacts from the disabled default job. I was able to confirm this by renaming the artifact to something unique in my disabled job and I noticed in the publish logs it was trying to download that one! I fixed my issue by deleting my disabled job entirely.
Can anyone clarify why Bamboo Artifact Download takes the last job's artifact even if said job is disabled?
When making use of Artifact Download task, you must pay attention to a few things:
Hope it helps :)
At least for our issue, and likely for others here, all of the required steps were done. They just didn't work. This certainly appears to be a bug in Bamboo, not a config issue.
For example, if you take a look at my post from back on March 26, you'll see that nothing changed in how the artifact was generated/stored in order to fix the issue.
Hi @Dan Rossiter,
Thank you for your update.
Unfortunately, we cannot tell what happened in your case because you have not provided any information to the issue you were experiencing apart from saying that you were experiencing issue(s). If you have deleted the deployment and recreated it to fix the issue, it seems the artifact download task was not pointing to the correct artifact, and reviewing its configuration through a support case could have provide more information to the issue, potentially fixing it without involving deployment recreation.
We understand there were issues related to artifact sharing but it does not mean all all issues reported on this threads are referring to the same problem and the lack of information does not help us helping you.
In case you continue on experiencing issues, you are more than welcome to raise a support case on https://support.atlassian.com and we can review the issue requesting specific information.
Rafael, there clearly is either a bug or an undocumented order of configuration.
My build plan did not have an artifact definition associated with its one job. I then went and created a deploy plan and realized I need to go back to build plan and add the artifact generation.
I did this, completed my deploy plan. I manually ran the build plan and verified the artifact had been published. I then ran the deploy plan and received error at top of this thread.
The only solution that worked was to delete my entire deploy plan and recreate it.
Clearly the build plan MUST have an artifact definition with at least one job BEFORE a deploy plan is created.
We are running Bamboo on an internal install version:
Atlassian Bamboo version 6.2.9 build 60215 - 11 Jan 18
Thank you for your update.
I have attempted on replicating the issue you have reported by following the steps given and Bamboo was able to download the artifact published without having to delete and recreate deployment :(
Test was conducted against Bamboo v6.2.9
echo "foo" > foo.txt
Copy pattern: *.txt
simple 17-Apr-2018 17:43:28 Build Community - Artifact - Default Job #1 (COM-ART-JOB1-1) started building on agent Default Agent
simple 17-Apr-2018 17:43:28
simple 17-Apr-2018 17:43:28 Build working directory is /opt/atlassian/product/bamboo/6.2.9/home-psql/xml-data/build-dir/COM-ART-JOB1
simple 17-Apr-2018 17:43:28 Executing build Community - Artifact - Default Job #1 (COM-ART-JOB1-1)
simple 17-Apr-2018 17:43:28 Running pre-build action: VCS Version Collector
simple 17-Apr-2018 17:43:28 Starting task 'Script' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
command 17-Apr-2018 17:43:28 Beginning to execute external process for build 'Community - Artifact - Default Job #1 (COM-ART-JOB1-1)'...
simple 17-Apr-2018 17:43:29 Finished task 'Script' with result: Success
simple 17-Apr-2018 17:43:29 Running post build plugin 'NCover Results Collector'
simple 17-Apr-2018 17:43:29 Running post build plugin 'Artifact Copier'
simple 17-Apr-2018 17:43:29 Publishing an artifact: TXT
simple 17-Apr-2018 17:43:29 Finished publishing of artifact Shared artifact: [TXT], pattern: [*.txt] in 55.88 ms
simple 17-Apr-2018 17:43:29 Running post build plugin 'npm Cache Cleanup'
simple 17-Apr-2018 17:43:29 Running post build plugin 'Clover Results Collector'
simple 17-Apr-2018 17:43:29 Running post build plugin 'Docker Container Cleanup'
simple 17-Apr-2018 17:43:29 Finalising the build...
simple 17-Apr-2018 17:43:29 Stopping timer.
simple 17-Apr-2018 17:43:29 Build COM-ART-JOB1-1 completed.
simple 17-Apr-2018 17:43:29 Running on server: post build plugin 'NCover Results Collector'
simple 17-Apr-2018 17:43:29 Running on server: post build plugin 'Build Hanging Detection Configuration'
simple 17-Apr-2018 17:43:29 Running on server: post build plugin 'Clover Delta Calculator'
simple 17-Apr-2018 17:43:29 Running on server: post build plugin 'Maven Dependencies Postprocessor'
simple 17-Apr-2018 17:43:29 All post build plugins have finished
simple 17-Apr-2018 17:43:29 Generating build results summary...
simple 17-Apr-2018 17:43:29 Saving build results to disk...
simple 17-Apr-2018 17:43:29 Logging substituted variables...
simple 17-Apr-2018 17:43:29 Indexing build results...
simple 17-Apr-2018 17:43:29 Finished building COM-ART-JOB1-1.
simple 17-Apr-2018 17:43:40 Build Deployment of 'release-1' on 'Staging' started building on agent Default Agent
simple 17-Apr-2018 17:43:40
simple 17-Apr-2018 17:43:40 Build working directory is /opt/atlassian/product/bamboo/6.2.9/home-psql/xml-data/build-dir/3080194-3145730
simple 17-Apr-2018 17:43:40 Executing build Deployment of 'release-1' on 'Staging'
simple 17-Apr-2018 17:43:40 Starting task 'Clean working directory task' of type 'com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:cleanWorkingDirectoryTask'
simple 17-Apr-2018 17:43:40 Cleaning working directory '/opt/atlassian/product/bamboo/6.2.9/home-psql/xml-data/build-dir/3080194-3145730'
simple 17-Apr-2018 17:43:40 Finished task 'Clean working directory task' with result: Success
simple 17-Apr-2018 17:43:40 Starting task 'Download release contents' of type 'com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:artifactdownloadertask'
simple 17-Apr-2018 17:43:40 Preparing to download plan result COM-ART-1 artifact: Shared artifact: [TXT], pattern: [*.txt]
simple 17-Apr-2018 17:43:40 Artifact [TXT] downloaded successfully in 3.226 ms to working directory
simple 17-Apr-2018 17:43:40 Finished task 'Download release contents' with result: Success
simple 17-Apr-2018 17:43:40 Starting task 'Script' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
command 17-Apr-2018 17:43:40 Beginning to execute external process for build 'Deployment of 'release-1' on 'Staging''...
build 17-Apr-2018 17:43:40 foo
simple 17-Apr-2018 17:43:40 Finished task 'Script' with result: Success
simple 17-Apr-2018 17:43:40 Finalising the build...
simple 17-Apr-2018 17:43:40 Stopping timer.
simple 17-Apr-2018 17:43:40 Build 3080194-3145730-3506178 completed.
simple 17-Apr-2018 17:43:40 Finished processing deployment result Deployment of 'release-1' on 'Staging'
As previously mentioned, it is preferable raising a support case so specific data and further investigation can be provided.
I've tried some of the solutions posted here and none have worked (so far). Is there a place we can look for more detailed logs or some kind of diagnostic logging we can enable? One hopes that Bamboo is logging this stuff some place and not just swallowing the details of the errors.
Does the level of support imply that artifact support isn't taken very seriously in Bamboo? Or is this just a thread where people show up after they've had bad luck trying to use it? Are the a bunch of happy artifact customers out there? And, if so, what are they doing differently?
Finally. . .has anybody on this thread tried a full-blown binary repo manager, like Archiva, Artifactory or Nexus? I know that Artifactory has a Bamboo plugin, but I'm not in a position to install it in production where I work. And I wouldn't want to request it from the infrastructure people if it doesn't help.
[later edit] After no action on my part to change anything, the artifact download succeeded this morning, twice in a row. This thread has the air of an uninitialized variable about it.
The wait is over... Portfolio for Jira Server and Data Center 3.0 is now officially here! Platform releases offer Atlassian an opportunity to shift our strategy, make bold predictions about t...
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