Cannot download artifact that was generated in a previous build

Laurent 0 Reputation points
2023-07-24T10:17:42.1+00:00

I'm trying to persist some data from one pipeline run to another. Essentially my pipeline works like this:

  • First download the data, if it exists (the data is a text file with a number in it)
  • Run a script, that will use that data (if it exists), and generate some new one
  • Publish the new data

Running the script works and publishing the file too as I can see in the pipeline report that there's one published artifact with the right file in it.

However, downloading the file always fail, it simply says this:

##[error]Artifact CheckWebsiteState was not found for build 10470.
Finishing: Download artifact

This is the YAML script I'm using:

name: $(Date:yyyyMMdd)$(Rev:-r)

trigger: none

pool:
  vmImage: 'ubuntu-latest'

stages:
- stage: CheckWebsite

  jobs:
  - job: Run
    
    steps:

    - download: current
      artifact: CheckWebsiteState
      displayName: 'Download artifact'
      continueOnError: true

    - task: AWSShellScript@1
      displayName: CheckWebsite
      inputs:
        filePath: '$(System.DefaultWorkingDirectory)/scripts/check-website.sh'
        arguments: '$(Pipeline.Workspace)'

    - publish: $(Pipeline.Workspace)
      artifact: CheckWebsiteState
      displayName: 'Publish artifact'

Any idea what might be the issue?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
41,892 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Monalla-MSFT 13,046 Reputation points
    2023-07-24T13:11:30.7733333+00:00

    @Laurent -

    Welcome to Microsoft Q&A and thanks for reaching out.

    Devops is not currently supported here on Microsoft QnA.

    The Community Members and Engineers are actively answering questions in dedicated forums here. Please post your question in that forum:

    https://developercommunity.visualstudio.com/spaces/21/index.html

    https://azure.microsoft.com/en-in/support/devops/

    Hope this helps. and please feel free to reach out if you have any further questions.


    If the above response was helpful, please feel free to "Accept as Answer" and "Upvote" the same so it can be beneficial to the community.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.