2

Trying to do something simple. Either access the name of the artifact from my release pipeline via some predefined variable, or create a variable for both my build and release pipeline for the artifact name. I don't want to hard-code it. I would like my build and release pipelines decoupled.

Variable Group Details

Publish Build Artifacts YAML:

- task: PublishBuildArtifacts@1
  inputs:
    PathtoPublish: 'dist'
    **ArtifactName: $(Storage.ArtifactName)**
    publishLocation: 'Container'
  displayName: 'publish artifact'

Output:

##[section]Starting: publish artifact
==============================================================================
Task         : Publish build artifacts
Description  : Publish build artifacts to Azure Pipelines or a Windows file share
Version      : 1.158.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/publish-build-artifacts
==============================================================================
##[section]Async Command Start: Upload Artifact
Uploading 10 files
File upload succeed.
**Upload '/home/vsts/work/1/s/dist' to file container: '#/3928702/$(Storage.ArtifactName)'**
Associated artifact 10 with build 58
##[section]Async Command End: Upload Artifact
##[section]Finishing: publish artifact
1
  • What is the preferred outcome?
    – 030
    Commented Dec 11, 2019 at 9:26

1 Answer 1

1

I needed to add:

variables:
- group: front_end-storage

At the top of my pipeline for the pipeline to pick up on the variables and authorize the group.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.