Azure Pipelines
4 TopicsCan't trigger a pipeline hosted in RepoA when a commit is pushed to RepoB
I’m using Version Dev17.M153.5 (TFS), and I have two repositories: my source code is hosted in Repo B, and my pipelines are hosted in Repo A to keep responsibilities separated. My goal is for the pipeline in Repo A to automatically run whenever a commit is pushed to Repo B. Below is my current setup: # MY MAIN PIPELINE IN REPO A: trigger: none resources: repositories: - repository: RepoB type: git name: Project/RepoB ref: develop trigger: branches: include: - develop - master pool: name: 'Test' variables: REPO_URL: 'https://tfs.company.com/company/Project/_git/RepoB' steps: - task: PowerShell@2 displayName: 'Configurar encabezado GIT_AUTH_HEADER con PAT' inputs: targetType: 'inline' script: | $headerValue = "Authorization: Basic " + [Convert]::ToBase64String([System.Text.Encoding]::UTF8. GetBytes(":" + $env:PAT)) git -c http.extraheader="$headerValue" clone $(REPO_URL) env: PAT: $(PAT) #Templates - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}: - template: pipeline-master.yml - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/develop') }}: - template: pipeline-develop.yml The Issue: This pipeline does not trigger automatically when a commit is pushed to Repo B on either develop or master. I cannot use checkout because it only accepts self or none. However, Repo B is successfully cloned, and the pipeline runs fine if I trigger it manually Additional Considerations: - Build services have “Read and Contribute” permissions set to “Allow” in both repositories. - Both Repo A and Repo B are part of the same project in Azure DevOps - The Personal Access Token (PAT) is correctly configured, and the pipeline passes when executed manually. - The YAML is hosted in the default branch (master) of Repo B Question: Why is the pipeline not triggering automatically, and how can I ensure it runs whenever a commit is pushed to Repo B? Many thanks in advance!255Views0likes2CommentsHow to update a deprecated vm image of an Agent Job and identify tasks added to it?
Hi, My release pipelines have been failing since the vm image "vs2017-win2016" was deprecated. So, I am trying to figure out if: 1. Editing the release pipeline and changing the Agent Specification to windows-latest from the droop down will resolve my issue. 2. How do I check the tasks assigned to my Agent Job? Do I not see tasks assigned to my Agent job because there was no task assigned or because the older image was deprecated and no longer available? Please help me with if anybody has any thought on this.Solved744Views0likes1CommentEnhance YAML Pipelines 'Changes' API Endpoint to allow user to specify the 'artifact'
There exists an API endpoint that allows a user to request the changes for a Classic Release run and pass the Artifact Alias that they would like the changes from: https://vsrm.dev.azure.com/{collection}/{project}/_apis/Release/releases/{releaseId}/changes?artifactAlias={artifactAlias} If a team replicates this type of pattern in YAML pipelines where there is a build pipeline (or multiple) and then a multi-stage YAML 'release' pipeline, there is no way to get the changes from the build artifacts. You can request the changes from the API for the multi-stage 'release' pipeline, but you cannot get the changes for the build pipelines IN THE CONTEXT OF the currently releasing stage. The build artifacts are specified in the release pipeline in the resources: resources: pipelines: - pipeline: myBuildPipeline source: myBuildPipeline trigger: branches: include: - main527Views0likes0Comments