Answers: <p>I needed to add:</p>
  
  <pre><code>variables:
  - group: front_end-storage
  </code></pre>
  
  <p>At the top of my pipeline for the pipeline to pick up on the variables and authorize the group.</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-12-12T04:09:13.693Z
Answers: 2019-12-12T04:09:13.693Z
Answers: Francisco Aguilera
Body: <p>Trying to do something simple. Either access the name of the artifact from my release pipeline via some <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/release/variables?view=azure-devops&amp;tabs=batch#default-variables" rel="nofollow noreferrer">predefined variable</a>, 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.</p>
  
  <p><a href="https://i.sstatic.net/ENmeH.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ENmeH.png" alt="Variable Group Details"></a></p>
  
  <p>Publish Build Artifacts YAML:</p>
  
  <pre><code>- task: PublishBuildArtifacts@1
    inputs:
      PathtoPublish: 'dist'
      **ArtifactName: $(Storage.ArtifactName)**
      publishLocation: 'Container'
    displayName: 'publish artifact'
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>##[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
  </code></pre>
  
Comments: CC BY-SA 4.0
Comments: 2019-12-11T09:26:29.340Z
Comments: What is the preferred outcome?
Comments: 030
Tags: <azure-devops>
Title: Azure DevOps Build and Release pipeline artifact name variable
UserDisplayName: Francisco Aguilera
ThreadText: # Azure DevOps Build and Release pipeline artifact name variable
  
  (Asked by: username_0 on 2019-12-10)
  
  Trying to do something simple. Either access the name of the artifact from my release pipeline via some [predefined variable](https://docs.microsoft.com/en-us/azure/devops/pipelines/release/variables?view=azure-devops&tabs=batch#default-variables), 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](https://i.sstatic.net/ENmeH.png)](https://i.sstatic.net/ENmeH.png)
  
  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
  
  ```
  
  **Tags:** azure-devops
  
  > **Comments:**
  > **username_1**: What is the preferred outcome?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-12-12. Score: 1 | Accepted answer
  
  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.
  
  
  ---
  
  