Skip to content

Added template parameters - #63

Open
Jacopo Carlini (jacopocarlini) wants to merge 4 commits into
Azure:masterfrom
jacopocarlini:master
Open

Added template parameters#63
Jacopo Carlini (jacopocarlini) wants to merge 4 commits into
Azure:masterfrom
jacopocarlini:master

Conversation

@jacopocarlini

Copy link
Copy Markdown

SUMMARY
Add template parameters to the task

DETAILS

Allowing the user to specify the template parameters of the pipeline.

example of usage:

- uses: Azure/pipelines@v1
  with:
    azure-devops-project-url: 'https://dev.azure.com/organization/project-name'
    azure-pipeline-name: 'pipeline-name' # name of the Azure pipeline to be triggered
    azure-devops-token: '${{ secrets.AZURE_DEVOPS_TOKEN }}'
    azure-pipeline-variables:  '{"variable1": "value1", "variable2": "value2"}' # optional stringified json
    azure-template-parameters: '{"variable1": "value1", "variable2": "value2"}' # optional stringified json

@ghost

Deleted user (ghost) commented May 19, 2022

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@jessetan

Copy link
Copy Markdown

Is there any progress on this PR? It would be great to be able to pass pipeline parameters in the action

@danielkimuipath

Copy link
Copy Markdown

Is there any update for this?

# Conflicts:
#	action.yml
#	lib/main.js
#	lib/pipeline.error.js
#	lib/pipeline.runner.js
#	lib/task.parameters.js
#	lib/util/logger.js
#	lib/util/pipeline.helper.js
#	lib/util/url.parser.js
@jacopocarlini

Jacopo Carlini (jacopocarlini) commented Sep 29, 2023

Copy link
Copy Markdown
Author

at the moment you can use my repository:

- name: Azure Pipelines Action - Jversion
  uses: jacopocarlini/azure-pipelines@v1.4
  with:
    azure-devops-project-url: 'https://dev.azure.com/organization/project-name'
    azure-pipeline-name: 'pipeline-name' # name of the Azure pipeline to be triggered
    azure-devops-token: '${{ secrets.AZURE_DEVOPS_TOKEN }}'
    azure-pipeline-variables:  '{"variable1": "value1", "variable2": "value2"}' # optional stringified json
    azure-template-parameters: '{"variable1": "value1", "variable2": "value2"}' 

@priscofarina

Prisco (priscofarina) commented Apr 15, 2024

Copy link
Copy Markdown

Hi guys,
when this feature will be released?
As far as I got the possibility to pass parameters should be already available in the release v1.2 but I still see problems while using it.

Tks

@jacopocarlini

Copy link
Copy Markdown
Author

Hi Prisco (@priscofarina),
there isn't the official support for this feature at the moment. You can use my action (v1.4) #63 (comment)

@nidhin077

Nidhin Unni (nidhin077) commented Apr 21, 2025

Copy link
Copy Markdown

T.J. Corrigan (@tjcorr) I have tried using the latest version of the action to pass a variable to the Azure pipeline, but it doesn’t seem to be passing the value correctly. I’ve attached the workflow I’m currently using. Could you please review it and let me know if there’s anything I might have misconfigured?


name: Trigger Azure DevOps Pipeline on GitHub Release

on:
  release:
    types: [published]
  workflow_dispatch:

jobs:
  trigger-devops-pipeline:
    runs-on: ubuntu-latest

    steps:
      - name: Print GitHub Tag
        run: |
           echo "📦 GitHub Tag: ${{ github.event.release.tag_name }}"

      - name: Trigger Azure DevOps Pipeline
        uses: tjcorr/pipelines@v1.4
        with:
          azure-devops-project-url: https://dev.azure.com/${{ vars.AZURE_DEVOPS_ORG }}/${{ vars.AZURE_DEVOPS_PROJECT }}
          azure-pipeline-name: '${{ vars.AZURE_DEVOPS_PIPELINE }}'
          azure-devops-token: ${{ secrets.AZURE_DEVOPS_PAT }}
          azure-pipeline-variables: >-
             {
               "GIT_TAG": "${{ github.event.release.tag_name }}"
              }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants