Azure / pipelines

Enable GitHub developers to trigger Azure Pipelines from a GitHub Actions workflow
MIT License
73 stars 83 forks source link

Unable to pass variables to Azure Pipeline #40

Closed alexrster closed 2 years ago

alexrster commented 3 years ago

Hi guys,

I'm trying to use 'azure-pipelines-variables' parameters to pass some values to Azure Pipeline. Azure Pipeline is getting triggered but variables are not gets passed.

There is a warning in the GitHub Actions log:

Warning: Unexpected input(s) 'azure-pipeline-variables', valid inputs are ['azure-devops-project-url', 'azure-pipeline-name', 'azure-devops-token']
Run Azure/pipelines@v1
  with:
    azure-devops-project-url: https://dev.azure.com/qxzone/ContactPoint%20IP%20phone
    azure-pipeline-name: Release
    azure-pipeline-variables: { "cp.CoreVersion": "1.13.1" }
    azure-devops-token: ***
  env:
    CoreVersion: 1.13.1

GitHub Workflow (part):

  release:
    runs-on: ubuntu-18.04

    steps:
    - name: Trigger Azure Release Pipeline
      uses: Azure/pipelines@v1
      with:
        azure-devops-project-url: 'https://dev.azure.com/qxzone/ContactPoint%20IP%20phone'
        azure-pipeline-name: 'Release'
        azure-pipeline-variables: '{ "cp.CoreVersion": "${{ env.CoreVersion }}" }'
        azure-devops-token: '${{ secrets.AZURE_DEVOPS_TOKEN }}'

Runner options: ubuntu-latest, ubuntu-18.04

jometzner commented 3 years ago

I wonder if this feature has been released yet.

charlottevdscheun commented 2 years ago

It is merged but not yet released. When can we expect it to be released?

VivekLad-CG commented 2 years ago

@alexrster: I am also getting the same warning. When we can expect this feature to release? @azure, @MicrosoftGit

alexrster commented 2 years ago

@alexrster: did you find another way?

Yup, the actual implementation seems to work fine but it isn't yet included in master branch here for some reason. I've forked this repo and created the v2 release with this feature enabled from there (https://github.com/alexrster/pipelines).

My pipeline now looks like the following:


    steps:
    - name: Trigger Azure Release Pipeline
      uses: alexrster/pipelines@v2
      with:
        azure-devops-project-url: 'https://dev.azure.com/.......'
        azure-pipeline-name: '.......'
        azure-pipeline-variables: '{ "cp.CoreVersion": "${{ env.CoreVersion }}" }'
        azure-devops-token: '${{ secrets.AZURE_DEVOPS_TOKEN }}'
tlrh314 commented 2 years ago

Would it be possible to tag a new release in the Azure/pipelines repo with support for azure-pipeline-variables? ๐Ÿ‘€

arturonaredo commented 2 years ago

Any news on this? Thanks!!

tlrh314 commented 2 years ago

Would it be possible to tag a new release in the Azure/pipelines repo with support for azure-pipeline-variables? ๐Ÿ‘€

Any news on this? Thanks!!

VivekLad-CG commented 2 years ago

Please try this: https://github.com/ladvivek7/Az_Pipeline

Josh-01 commented 2 years ago

Merged #35

tlrh314 commented 2 years ago

Merged #35

Awesome! Could you also tag a new release?

Josh-01 commented 2 years ago

Merged #35

Awesome! Could you also tag a new release?

Hi @tlrh314 , Tagged here ๐Ÿ‘

flanakin commented 2 years ago

+1 This is a bit crazy it's gone on for 8 months and it's already documented in the public docs ๐Ÿ˜’

klcantrell commented 2 years ago

Thank you @Josh-01 and team for v1.2. I updated my GitHub template to use Azure/pipelines@v1.2 and now variables are passed to my pipeline on the Azure side.