0

I've recently started using Azure DevOps & I want to store a .json file generated during one nightly scheduled build run somewhere so that when the nightly scheduled build runs next time for the same pipeline, I should be able to use that stored json file in this current build run. I've tried Publish and Download Pipeline Artifacts task but it ask me to specify the specific build from where the artifacts should be downloaded which in my case is not possible to specify as there are multiple Individual CI builds that happens throughout the day between those nightly scheduled build.

1 Answer 1

0

You could use a pipeline tag to identify the right build:

  1. At the end of the nightly scheduled build, make it tag itself as "nightly" e.g. with a powershell task calling build.addbuildtag
  2. The next nightly build can identify the previous one by this tag and download the artefact it needs:
    - task: DownloadPipelineArtifact@2
      inputs:
        source: 'specific'
        project: 'FabrikamFiber'
        pipeline: 12
        runVersion: 'latest'
        tags: 'nightly'
Sign up to request clarification or add additional context in comments.

2 Comments

I ended up doing the same thing before reading this solution lol but happy to know that I am on right track, thank you :)
Glad to hear it's working :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.