The artifact definition or subscription has probably been removed from build.

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

 

 

Problem

The artifact definition or subscription has probably been removed from build, meaning, cannot be found.

The following appears in build logs or deployment logs, depending on where the task is being executed:

simple	07-Apr-2017 12:34:28	Build Deployment of 'release-1' on 'FOO' started building on agent bamboo.agent
...
simple	07-Apr-2017 12:34:28	Preparing to download plan result PROJ-PLAN-1 artifact: Shared artifact: [ArtifactName], pattern: [*.jar] anchored at: [target]
...
simple	07-Apr-2017 12:34:28	Starting task 'create Directory' of type 'com.atlassian.bamboo.plugins.bamboo-scp-plugin:sshtask'
simple	07-Apr-2017 12:34:28	Connecting to some.server.domain on port: 22
simple	07-Apr-2017 12:34:29	Executing [mkdir -p /path/to/directory/release-1]
simple	07-Apr-2017 12:34:29	[mkdir -p /path/to/directory/release-1] has finished.
simple	07-Apr-2017 12:34:29	Result: exit code = 0
...
error	07-Apr-2017 12:34:29	Unable to find artifact with id 74186810, called [ArtifactName] at the time this task was configured. The artifact definition or subscription has probably been removed from build.

Diagnosis

Check task(s) to be executed against Deployment > Environment:

select * 
  from DEPLOYMENT_ENVIRONMENT de
 where de.ENVIRONMENT_ID = 74154061;

Cause

Based on the SELECT above we can notice the following:

Artifact download
<taskDefinition>
    <id>14</id>
    ...
    <pluginKey>com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:artifactdownloadertask</pluginKey>
    ...
        <item>
            <key>artifactId_0</key>
            <value>74186810</value>
        </item>
SCP
  <taskDefinition>
      <id>5</id>
      ...
      <pluginKey>com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask</pluginKey>
      <finalising>false</finalising>
      ...
          <item>
              <key>artifactToScp</key>
              <value>74186810:2:0:ArtifactName</value>
          </item>

The Artifact download task has been (re)added after the SCP task and because of that SCP does not have the correct reference to the downloaded artifact, in other words <value>74186810:2:0:ArtifactName</value>. The 2 (second value) represents the ID for the Artifact download task and since its ID is 14, the SCP task cannot find the correct artifact as they are async, as in one task was changed the other was not.

Workaround

In order to fix the SCP task, you could simply:

  1. go to environment where the SCP task is failing
  2. go to Edit tasks
  3. select the SCP task and re-save it

 

Last modified on Jun 21, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.