missing artifacts after bamboo specs run

Issue #57 new
Prem Chudziński created an issue

I get ana random error after BamboSpecs script execution.

*Starting task 'Deploy abc' of type 'com.atlassian.bamboo.plugins.deploy.continuous-plugin-deployment:deploy-task'

Unable to find the artifact with id 1179649 in this task's context. Has an artifact subscription been configured for that artifact in this job?*

Once I reopen the deployment task and click save (without changing any option) I can redeploy successfully.

Very annoying.

Comments (5)

  1. Prem Chudziński reporter

    I'm not able to use the plugin as the issue occurs in several scenarios.

    Additionally sometimes the task takes invalid artifact binary. For example the build job creates jar, bamboo-continuous-plugin-deployment deploys it, afterwards build job creates the jar again , bamboo-continuous-plugin-deployment deploys the first jar!!!!! but in the logs I can see its using the latest build jar....

    to solve that I had to use clean-working-directory that failed

    06-Mar-2018 15:13:37 Starting task 'Deploy ABF' of type 'com.atlassian.bamboo.plugins.deploy.continuous-plugin-deployment:deploy-task' 06-Mar-2018 15:13:37 Unable to find the artifact with id 1179649 in this task's context. Has an artifact subscription been configured for that artifact in this job? 06-Mar-2018 15:13:37 Finished task 'Deploy ABF' with result: Failed 06-Mar-2018 15:13:37 Finalising the build...

    after removing the clean-working-directory task the deployment went ok and now the latest version is deployed

  2. Prem Chudziński reporter

    OK after multiple attempts I gave up and created my own solution

    1. First I copy the jar using scp task to a custom location - Artifact Download doesn't work using bamboo 6.3 (guys are you testing your plugins....?)

    2. Replaced the continuous-plugin-deployment:deploy-task with a simple script task The script takes the jar with the latest date

    #!/bin/bash
    
    url="${bamboo.url}"
    
    cd /home/jira/customlocation
    f=$(ls -t | tail -n +1 | head -1)
    
    url="https://user:password@$url/rest/plugins/1.0/"
    token=$(curl -sIk "$url?os_authType=basic" | grep upm-token | cut -d: -f2- | tr -d '[[:space:]]')
    curl -k -XPOST "$url?token=$token" -F plugin=@//home/jira/customlocation/$f
    

    Done

  3. David

    So for those of you working on this or wanting to fix your bamboo spec issue I discovered a work around. Not the best but does the job.

    Go to the deployment task in the environment.
    Locate the select field in the image and then inspect the element. You will see the value you are looking for in your desired option.

    From there update the Map (Java spec) with key confDeployJar to be the value I used

    .put("confDeployJar", String.format("v2:%s:2:0:plugin",deploymentBranchJob))

    however how you do it is up to you.

    From here redeploy your spec either from IDE or to your selected version management system attached to your bamboo instance and you should be able to deploy now.

  4. Log in to comment