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

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

 

 

問題

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.

診断

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

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

原因

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.

回避策

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

 

最終更新日 2017 年 6 月 21 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.