Unable to download artifact Shared artifact

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!

15 answers

This widget could not be displayed.

Do you see the artifact listed on the "Artifacts" tab of the build result?

This widget could not be displayed.

Hi Claude,

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.

-Christian 

This widget could not be displayed.

@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.

 

This widget could not be displayed.

@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


Directory: C:\Users\user001\bamboo-agent-home\xml-data\build-dir


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


Directory: C:\Users\user001\bamboo-agent-home\xml-data\build-dir\DSC-SYS-JOB1


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: [.]

This widget could not be displayed.

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.

I had this too today, but  just deleted the problematic Deployment plan and created a new, that worked.

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.

This widget could not be displayed.

did anyone ever solve this issue?

I was able to solve problem by deleting entire deployment project and recreating it. 

This widget could not be displayed.

Me too facing similar issue.Artifact_download_issue.PNG

This widget could not be displayed.

Try to save each artifact manually (open artifact definition, check/uncheck shared, click on save) - that helped me resolve the issue.

This widget could not be displayed.

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.

This widget could not be displayed.

Same here. Apparently it works only if I change the "Destination path" on the deployment end to anything but what was used before. 

This widget could not be displayed.

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.

This widget could not be displayed.

I have tried many of the solutions from this thread and they work, but only for a brief period and them I am back to the same issue.  Usually it will work only a day or two...this is very frustrating.

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?

This widget could not be displayed.

same here can't use Artifact Download task

This widget could not be displayed.

Hello community,

When making use of Artifact Download task, you must pay attention to a few things:

  • plan that published the artifact cannot be disabled
  • Artifact Download task will get the latest shared artifact available
  • Only shared artifacts can be consumed
  • Shared artifacts are stored outside Build Working Directory, you can find the correct location by referring to <bamboo-home>/bamboo.cfg.xml:
    <property name="bamboo.artifacts.directory">${bambooHome}/artifacts</property>
  • Make sure the build has published a shared artifact, for instance, if you have set up your deployment associating it with PROJ-PLAN and the shared artifact was published in one of its branches (e.g PROJ-PLAN123), if you do not explicitly deploy from this branch, Bamboo will try to consume the artifact from PROJ-PLAN, failing the deployment because of its inexistency in PROJ-PLAN

Perhaps this knowledge base article Artifacts in Bamboo Server - https://confluence.atlassian.com/x/6lRqMQ will provide clarification to this matter.

Hope it helps :)

Kind regards,

Rafael

Refael,

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.

-Dan

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.

Kind regards,

Rafael

This widget could not be displayed.

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

Hi @Henry Noerdlinger,

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

  1. created a Project - Plan (e.g Community - Artifact, planKey COM-ART)
  2. added Script task
    echo "foo" > foo.txt
  3. finalized plan creation
  4. created Deployment (e.g Community), consuming planKey COM-ART above created
  5. added Environment (e.g Staging), by default two task are added 1) Clean working directory 2) Artifact download
  6. added Script task to print artifact downloaded
    cat foo.txt
  7. saved tasks, message is displayed.
    No shared artifacts found for related plan. Please configure the build plan to publish shared artifacts.
  8. go back to plan and create Artifact definition
    Name: TXT
    Location:
    Copy pattern: *.txt
  9. enable plan and run build, resulting on COM-ART-1
    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.
  10. create release and deploy it, as a result, deploy displays foo
    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.

Kind regards,

Rafael

Thank you for attempting to recreate. I will raise a support case next time. I got my solution from other similar posts on the community forum. That is part of why I was beginning to feel there may be something else wrong. 

 

All the best,

h

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

54 views 1 0
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you