GithubHelp home page GithubHelp logo

azure / pipelines Goto Github PK

View Code? Open in Web Editor NEW
72.0 13.0 82.0 3.42 MB

Enable GitHub developers to trigger Azure Pipelines from a GitHub Actions workflow

License: MIT License

JavaScript 43.28% TypeScript 56.72%

pipelines's People

Contributors

dependabot[bot] avatar ionutleca avatar josh-01 avatar kanika1894 avatar keifgwinn avatar microsoft-github-operations[bot] avatar microsoftopensource avatar n-usha avatar nenoloje avatar nishubansal avatar sundargs2000 avatar tjcorr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pipelines's Issues

[Question/Feature-Request] Pass template parameters for deployment at approval

Hello!

I'd like to be able to pass template parameters for my environment deployments when the stages are being run. My use case is that we have multiple environments, and have parameterized some features that we do not want deployed in certain environments. We parameterized this by using pipeline parameters. Currently we're setting them at the top level in our pipeline yaml file and passing them down into each deployment stage (which has been templatized).
Screen Shot 2022-05-17 at 3 38 38 PM

This solution is sub-optimal because we don't necessarily want to have the same value for this parameter injected into each deployment stage, and would rather be able to specify this in the actual deployment. Ideally, we'd be able to set the parameters as we're running the stages. Somewhere closer to here, or perhaps in the approval modal:

Screen Shot 2022-05-17 at 3 43 40 PM

Is this possible? I wasn't able to find anything in the docs related to this and I couldn't think of another way to accomplish this other than what we have already implemented.

Thanks in advance for your help!

Error running pipeline from action

Information

When trying to run a pipeline from a GitHub action the below error is produced. I can confirm the URL works as I use it to access my project. The project is private, not sure if that helps.

Error

##[error]Failed to parse project url: "https://dev.azure.com/powerful-it/Monitoring/".
Specify the valid project url (eg, https://dev.azure.com/organization/project-name or https://server.example.com:8080/tfs/DefaultCollection/project-name)) and try again.

Action

pipeline:  
  name: 'DevOps Pipline' 
  needs: [terraform]  
  runs-on: ubuntu-latest  

defaults:
  run:
  working-directory: ./mon-app

steps:
- name: Run
   uses: Azure/pipelines@v1
   with:
     azure-devops-project-url: 'https://dev.azure.com/powerful-it/Monitoring/'
     azure-pipeline-name: 'app'
     azure-devops-token: '${{ secrets.AZURE_DEVOPS_TOKEN }}'`

[Bug] Could not queue the build because there were validation errors or warnings.

I am trying to use the new version:

- uses: Azure/[email protected]
  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

but once I create the workflow in which I pass some variables I get the following message:

Error: Could not queue the build because there were validation errors or warnings.

Are those not supported yet?

Removing the following section from my workflow definition, the pipeline get triggered.

azure-pipeline-variables: '{"variable1": "value1", "variable2": "value2"}' # optional stringified json

[Bug] macOS-latest Xamarin builds fail

Starting today, 7-14-2023, our Xamarin iOS builds that are currently building on macOS-latest images have been failing with the following error.

/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(283,5): error NETSDK1073: The FrameworkReference 'NETStandard.Library' was not recognized.

This started happening today without any really code changes on our end. We even tried to build older releases that are now also failing.

What do we need to do differently to get our pipelines unblocked?

[Bug/Question/Feature-Request] Parameters passed to Pipeline are not being accepted

Pipeline parameter seems not beeing accepted! :-(

  • 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

I get this error:

Warning: Unexpected input(s) 'azure-pipeline-variables', valid inputs are ['azure-devops-project-url', 'azure-pipeline-name', 'azure-devops-token']
Run Azure/pipelines@v1
Creating connection with Azure DevOps service : "https://dev.azure.com/SI-idtxccoe"
Connection created
Error: Failed request: (401)

[Question] How to select stages to run?

hi, I wanted to know how to select stages to run through github workflow for the pipelines present in ADO?
Do i need to configure azure-pipeline-variables or is there any other field similar to this one?

Feature request

Hey, everyone. thank you for this github action.

Is there a way to pass a parameter to the Azure Pipeline we want to call??

I want to call an Azure Pipeline only after the semantic release is generated here on github so when calling the Azure Pipeline, I want to tell it to use an specific variable value containing the latest github release generated to put a footer information on my website.(eg.: v1.5.12)

Again, thank you for this.

[Question] How can I pass variables to the Azure Devops Pipeline

Hi,

I'm using this action and I'm able to trigger the DevOps pipeline, but I can't seem to get the variables working.
Using it like so:

runs-on: ubuntu-20.04
steps:

  • name: DevOps release trigger
    if: github.event_name == 'push'
    uses: Azure/pipelines@v1
    with:
    azure-devops-project-url: 'https://dev.azure.com/orgnization/project'
    azure-pipeline-name: 'Pipeline' # name of the Azure pipeline to be triggered
    azure-devops-token: '${{ secrets.AZURE_DEVOPS_TOKEN }}'
    azure-pipeline-variables: '{"Branch": "testbranch", "App.Name": "apptest"}' # optional stringified json

I was expecting to pass the variables to the Azure DevOps pipeline, but nothing happens. The variable exists on the DevOps pipeline but isn't updated when the release happens.

Predefined `Build.SourceBranch` variable not working

Hi,

We're trying to migrate from pr triggers in the azure-pipeline.yml to a GitHub Action trigger, using the following action:

  ...
  azure_pipeline:
    needs: [previous_action]
    runs-on: ubuntu-latest
    steps:
      - name: Azure Pipelines Action
        uses: Azure/pipelines@v1
        with:
          azure-devops-project-url: https://dev.azure.com/organization/project
          azure-pipeline-name: cogz-ci
          azure-devops-token: ${{ secrets.AZURE_DEVOPS_TOKEN }}

The trigger works great, but some of the build information is missing.

For example, our build name in the azure-pipeline.yml file is defined as follows:
name: cogz-ci-$(branchName)-$(Date:yyyyMMdd)$(Rev:.rr)
branchName is defined in a global template as:

  ${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
    branchName: $[ replace(replace(replace(variables['system.pullRequest.sourceBranch'], 'refs/heads/', ''), '\', '-'), '/', '-') ]
  ${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}:
    branchName: $[ replace(replace(replace(variables['build.sourceBranch'], 'refs/heads/', ''), '\', '-'), '/', '-') ]

When running with the azure pipelines PR trigger, we get:
image

But when running with the GitHub Action trigger, we get:
image
(the build also fails because we're using branchName in a lot of places)

Are we missing something? Should this be passed as a variable when using the GitHub Action trigger?

Thanks!

[Bug] - Cross REPO connection is not happening

Hello Team.

Firstly I would like to appreciate for this Work Action., that would enable integration from Github actions and ADO Pipelines.

I do have a concern, in fact it throwed me a limitation.
my scenario is: I have N number of Microservices{ Facets}, where they are holding respective repos in the Github ( MS1, MS2 ,MS3 ,MS4 and repos are MS1, MS2, MS3, MS4)
and i have single azure pipeline where all these microservices are passed as parameters.

but in this action, i have observed, a limitaion that , the ADO pipeline connection is happening only, if the github repo and Azure Pipeline Repo are SAME. what if I have a single file in ADO Pipeline that work for all the REPOS.

its throwing the following error:
##[debug]pipeline is not linked to same Github repo
##[debug]Input: {
##[debug] "definition": {
##[debug] "id": 2334
##[debug] },
##[debug] "project": {
##[debug] "id": "66e74794-9916-410b-b624-07d49748bbff"
##[debug] },
##[debug] "sourceBranch": null,
##[debug] "sourceVersion": null,
##[debug] "reason": 1967,
##[debug] "parameters": "{"servicename": "hybrid", "appversion": "needs.build.outputs.build_version", "branchname": "Vamsi_Feature/Scaleset"}"

I am just giving the project URL and Pipeline name. it should be working on irrespective of the REPOS.

please suggest me if i am missing something.

Thanks.

PipelineName does not perform an exact search - results in errors if pipelines contain the same name

Issue

Mutiple pipelines are returned when releaseApi.getReleaseDefinitions and buildApi.getDefinitions are called if the pipeline name supplied exists within the pipeline name.

i.e.
If you have two pipelines called: myFirstPipeline and myFirstPipeline - Copy and you run this action with a pipeline name of myFirstPipeline you will get an error:

> **Error**: More than 1 Pipeline named "myFirstPipeline" found in project "myproject"

Expected Behavior

From the above example, running this action with a pipeline name of myFirstPipeline should execute the pipeline named myFirstPipeline and not error saying it found more than one build definition.

Make PS faster by removing the calls to get progress info

There is a feature request for pipelines -

The progress bar in PowerShell makes Invoke-WebRequest literally 50x slower. Downloading the .iso for building dev images would probably hit the default 60 minute timeout with progress enabled. With progress disabled it completes in a few minutes like you’d expect. This is especially galling because progress is not rendered by pipelines so it is wasted work.

Can we start a discussion with the ADO and GitHub Actions folks to see if their PowerShell tasks can disable progress automatically? That would be an immediate boost in pipeline performance with no downside that I’m aware of. Disabling progress in PowerShell just requires a single line of setup:
$ProgressPreference = 'SilentlyContinue';

For the above can we please check if any changes are needed in the pipelines Action?
Related on ADO - https://dev.azure.com/mseng/AzureDevOps/_workitems/edit/1914047

All Azure pipeline tests failed on pull request

I am new to open source. I tried to contribute to issue #42124. I have to add an example of pandas.DataFrame.reorder_levels in frame.py script of pandas module at the end.
I have added the example which is shown here.
#-------------------------------------------------------------------------

   pandas.DataFrame.reorder_levels

DataFrame.reorder_levels(order, axis=0)[source]
Rearrange index levels using input order. May not drop or duplicate levels.

Parameters
orderlist of int or list of str
List representing new level order. Reference level by number (position)
or by key (label).

axis{0 or ‘index’, 1 or ‘columns’}, default 0
Where to reorder levels.

Returns
DataFrame

'''

Example

We create a dataframe with multiple index columns

import pandas as pd
data= pd.DataFrame({'Index1':[1,2,3,4,5],'Index2':['a','b','c','d','e'],'col1':['one','two','three','one','two']})
data.set_index(['Index1','Index2'],inplace=True,drop=True)
print(data)
'''
col1
Index1 Index2
1 a one
2 b two
3 c three
4 d one
5 e two
'''
index_order=['Index2','Index1'] # Order of indexes we want
data= data.reorder_levels(index_order,0) # Reorder the indexes
print(data)
'''
col1
Index2 Index1
a 1 one
b 2 two
c 3 three
d 4 one
e 5 two
'''

------------------------------------------------------------

However, all azure pipeline tests failed. Can anyone tell me how can I resolve the issue?

How to link Azure DevOps pipeline with GitHub repo

Hi, I'm trying to configure a workflow on a GitHub project using the Azure/pipeline@v1 action and facing a problem. I can successfully trigger the pipeline in Azure DevOps, but it always checkout the master branch from github rather than the PR opened.
I can see the log is trigger from the following: https://github.com/Azure/pipelines/blob/master/src/pipeline.runner.ts#L82
but it is unclear how I can do the link suggested by the comment on line 76

// If definition is linked to existing github repo, pass github source branch and source version to build.

My pipeline on DevOps uses multiple checkout (self and a github repo using a GitHubServiceConnection) and is hosted in a DevOps repository.

Thanks for you help.

[Question] Azure pipelines status

Hi,

when I use azure pipelines action, it triggers the pipeline but it does not wait for the pipeline to finish, so even if the build fails, the PR in GitHub does not get blocked.

Is it possible to do something like that?

Doing a direct integration with Azure Pipelines, it shows the status, but it does not block the PR from merge.

[Bug] DevOps pipeline fails when Azure function is configured to access its Storage account using Managed identity

Hi,

I am trying to setup managed identity based access between Azure function and its storage account, as it is explained here. I want to accomplish this using Azure pipeline with Bicep, however it appears that the pipeline will succeed deploying the app only if there is AzureWebJobsStorage configured. The error i get during app deployment is below,
##[error]Error: Unable to find the storage account associated with the function app.

Below are key parts of Bicep file:

resource functionAppProductionSlotSettings 'Microsoft.Web/sites/config@2021-03-01'= {
  name: '${functionApp.name}/appsettings'
  properties:{
    'FUNCTIONS_EXTENSION_VERSION':'~4'
    'FUNCTIONS_WORKER_RUNTIME': 'dotnet-isolated'
 //.....THIS IS NECESSARY FOR PIPELINE TO WORK
    // 'AzureWebJobsStorage': 'DefaultEndpointsProtocol=https;AccountName=${storageAccount.name};EndpointSuffix=${environment().suffixes.storage};AccountKey=${storageAccount.listKeys().keys[0].value}' 
    'AzureWebJobsStorage__accountName':storageAccount.name
  }
}
.......
.......
resource roleAssignmentForStorageAccount 'Microsoft.Authorization/roleAssignments@2020-10-01-preview' = {
  name: guid(storageAccount.id, functionApp.id, functionAppName)
  scope: storageAccount
  properties:{
    principalType: 'ServicePrincipal'
    principalId: functionApp.identity.principalId
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b7e6dc6d-f1e8-4753-8033-0f276bb0955b')//STORAGE BLOB DATA OWNER
  }
}

Please suggest how to overcome the above issue. Thanks.

How to link back to the PR (GitHub commit status / Check API)

If you define a normal Azure pipeline (triggering on trigger: or pr:), as it finishes it automatically adds the link to the finished build under the checks/statuses section of the PR.

However, if I use Azure/pipelines@v1 to trigger an Azure pipeline from a GitHub Action, it does not push back any kind of commit status on completion. Is there a way to pass either the relevant commit ref or PR number to the Azure build, so that when it finishes it can post back a Check?

That would be ideal; if it's not possible, I guess I can do it myself, but I still need to then somehow pass the PR number as a "parameter" to the Azure build, and then use that PR number to write something in my own pipeline yaml to call back to GitHub (maybe using the GitHub REST API). I'd be interested in any examples of something like that.

[Bug] Does not allow to parameterize the repository resource ref attribute when the resources are inside an extended template.

Consider the following simple pipeline consisting of two small YAML files:
run.yaml

trigger: none

extends:
  template: do-run.yaml
  parameters:
    master_branch: publish_test

do-run.yaml

parameters:
  - name: master_branch
    default: master

resources:
  repositories:
    - repository: chip_aks_helmcharts
      type: git
      name: CHIP/chip_aks_helmcharts
      ref: ${{ parameters.master_branch }}
      # https://dev.azure.com/CeridianHosting/CHIP/_git/chip_aks_helmcharts

steps: []

The pipeline link is https://dev.azure.com/CeridianHosting/CHIP/_build?definitionId=695

The code is on the test branch. Trying to run the pipeline results in

/test_yaml_extends/run.yaml: Internal error reading the template. Expected a scalar, a sequence, or a mapping

image

  1. If I replace ref: ${{ parameters.master_branch }} with ref: publish_test, then queuing the build works fine. (this is the master branch)
  2. If I inline the do-run.yaml, i.e. not use the YAML extension feature (branch no_extended_yaml) then I can queue the build just fine and modify the ref attribute.

So it seems that the parametrization of the ref attribute is not possible when the resources are declared inside the extended YAML.

Unable to pass variables to Azure Pipeline

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

Using an enterprise http/https proxy for this action

Hi everyone,

Is there a way to force the use of an external enterprise proxy for this action while connecting to azure devops?
I tried forcing variables http/https_proxy both on a self hosted runner and on the workflow itself to no use.

The environment is Github enterprise 3.0.4 with self-hosted runners.

Thank you

[Question] Multi line Pipeline Variables

when trying to split the pipeline variables on multiple lines I am getting this:
Could not cast or convert from System.String to System.Collections.Generic.IDictionary`2[System.String,System.String].

  - name: Azure Pipelines Action
    uses: Azure/[email protected]
    with:
      ...
      azure-pipeline-variables: >
        '{
         "v1": "1",
         "v2": "2", 
         "v3": true 
          }'

[Bug] Sample in README needs updating

Sample provided on the README gives an action that won't operate correctly.


- 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

however if you use 'azure-pipeline-variables' in your own action you get

Warning: Unexpected input(s) 'azure-pipeline-variables', valid inputs are ['azure-devops-project-url', 'azure-pipeline-name', 'azure-devops-token']

So sample should read

- uses: Azure/[email protected]
  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

Encountered on 3drepo/3drepo.io#3475

Required Template check feature behaves incorrectly

Let's consider this example scenario, where I have 2 Azure DevOps projects with following repositories:

  • Platform (Project)
    • templates (Repository)
  • Product-A (project)
    • workload (Repository)
    • fake-templates (Repository)

The intention is Platform team provides some "secure/trusted" templates to the product teams and enforces the templates to be extended via Required Template Check feature.

With that in mind, I wanted to setup approvals and check policy (based on Required Template check). Therefore, I navigate:

Product-A > Project settings > Agent Pools > Azure Pipelines > Approvals and checks (from top-right menu)

Create a Required YAML template policy with following configurations:

  • Repository Host: Azure Repos
  • Repository : Platform/templates
  • Ref: refs/heads/master
  • Path to template: template.yml

Next, I create a pipeline for workload repository in Product-A project, here's the YAML:

resources:
  repositories:
    - repository: templates
      type: git      
      name: Platform/templates
extends:
  template: template.yml@templates
  parameters:
      yesNo: false 

This works - as expected.
However, if I now modify the YAML with the following:

resources:
  repositories:
    - repository: templates
      type: git      
      name: Product-A/fake-templates  ## Notice, here I am pointing to a template that shouldn't be allowed
extends:
  template: unsafe-template.yml@templates
  parameters:
      yesNo: false 

This would work too - without any complaints. This must be a bug/fault.

This behavior clearly not what is described in the documents. The approval checks on Agent pool serves no purposes if anybody can just avoid/bypass the required template check completely with an altered YAML file.

[Bug] Node.js 16 is deprecated and should be replace with Node.js 20

This should be updated or the action will stop working.

node16

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: Azure/pipelines@f1fe65f3daf2f705ca49c37ef172109e3e7c0d8f. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

Question: Delay reporting from ADO

When running a GH Action for Azure Pipelines the status succeeded in 8 seconds. However, on ADO, it actually continued running for another 16 minutes. Is there a way to delay the reporting back to GH Actions until the true status is returned from ADO?

Thanks,

Cancel in-progress runs on PR when new run is triggered from action

Currently, if an Azure Pipelines CI run is triggered by this action, and then a new commit is pushed on a pull request that triggers a 2nd CI run, instead of canceling the 1st CI run, both runs will continue to completion.

Is there any way to signal to Azure Pipelines that subsequent triggers should cancel in-progress runs for the current branch?

Multiple pipelines with the same name

I have a GitHub Action that should trigger an Azure DevOps pipeline. In my project, I have multiple pipelines that have the same name, but are grouped under different folders by convention. For example:

+ my-app-1
  - deploy
+ my-app-2
  - deploy

In the above, my-app-1 and my-app-2 are folders corresponding to different repositories, and our standards are to have a deploy pipeline for each repository. I would like to trigger specific deploy pipelines using a GitHub Action.

- name: Azure Pipelines Action
  uses: Azure/pipelines@v1
  with:
    azure-devops-project-url: https://dev.azure.com/organization/project
    azure-pipeline-name: 'deploy'       # this is in question
    azure-devops-token: ${{ secrets.AZURE_DEVOPS_TOKEN }}

How would I configure the action to trigger the my-app-1/deploy pipeline specifically?

In the above snippet, if I specify deploy by itself, I get an error:
More than 1 Pipeline named "deploy" found in project "project"

If I try to prefix this with either my-app-1/deploy or my-app-1\deploy, I get a different error:
Failed request: (401)

The only way I'm able to get this to work is if I give each pipeline a unique name, but I'd prefer not to have to break my existing conventions to do this.

[Bug] Deprecations

This should be updated or the action will stop working

node12

Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: Azure/pipelines

set-output

The `set-output` command is deprecated 
and will be disabled soon. Please upgrade to using Environment Files. 
For more information see: 
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Git Action fails after connection creation

My Git Action workflow fails after connection is created with Azure DevOps service, getting Error: Could not queue the build because there were validation errors or warnings. as it shows in the screenshot below.

Screenshot 2021-12-31 at 13 49 55

[Bug] PublishPipelineArtifact fails if artifact contains a symbolic link

Hi, I'm seeing an error when trying to run the PublishPipelineArtifact task (version 0.141.0) on an artifact which contains a symlink.

Here's the error message:

##[error]Unable to load symbolic/hard linked file.  Check 'fsutil behavior query SymlinkEvaluation' to ensure proper behavior.
##[debug]Processed: ##vso[task.logissue type=error;]Unable to load symbolic/hard linked file.  Check 'fsutil behavior query SymlinkEvaluation' to ensure proper behavior.
##[debug]Processed: ##vso[task.complete result=Failed;]
##[debug]   at Microsoft.VisualStudio.Services.BlobStore.Common.PrecomputedHashesGenerator.GetFileBlobDescriptorAsync(String rootDirectory, Boolean chunkDedup, Boolean shouldPreserveSymbolicLink, Boolean shouldPreservePermissionValue, PageItem pageItem, CancellationToken cancellationToken)

I think this is a duplicate of https://developercommunity.visualstudio.com/t/PublishPipelineArtifact1----errorUn/1102572?space=21&q=symlink&viewtype=all, but that issue says the problem was fixed in agent version 2.160.0, and we're running agent version 2.202.0. We're using Linux agents.

Do you know if this issue can be fixed, or if there is a workaround?

Please let me know what additional diagnostic information you need.

Thanks!

Release pipeline is not getting triggered when triggering the build pipeline using GitHub Actions

On a relevant change, we run a GitHub action which then trigger the azure build pipeline. We have configured the pre-deployment condition that whenever there is a build from main branch it should trigger the release pipeline. In our case, it is not getting triggered. But if we manually run the build pipeline, the whole flow is working fine.

We did some debugging on our end and found out that, while firing the azure pipeline API, Actions is passing a random value "943" as a build reason in API body. It should pass one of the build reasons mentioned here.

With "943" as build reason, we are getting the below error:

System.Runtime.Serialization.SerializationException: Enum value '943' is invalid for type 'Microsoft.TeamFoundation.Build.WebApi.BuildReason' and cannot be serialized. Ensure that the necessary enum values are present and are marked with EnumMemberAttribute attribute if the type has DataContractAttribute attribute. at System.Runtime.Serialization.EnumDataContract.WriteEnumValue(XmlWriterDelegator writer, Object value) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle) at WriteBuildToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract ) at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle) at WriteBuildCompletedEventToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract ) at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeAndVerifyType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, Boolean verifyKnownType, RuntimeTypeHandle declaredTypeHandle, Type declaredType) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithXsiType(XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle objectTypeHandle, Type objectType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle, Type declaredType) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle) at WriteServiceEventToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract ) at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(XmlDictionaryWriter writer, Object graph) at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(Stream stream, Object graph) at Microsoft.ServiceBus.Messaging.BrokeredMessage..ctor(Object serializableObject, XmlObjectSerializer serializer) at Microsoft.VisualStudio.Services.Cloud.ServiceBusPublishHelper.GetBrokeredMessage(MessageBusMessage input, String messageBusIdentifier) in D:\v2.0\P1\_work\5\s\Vssf\Sdk\CloudServer\ServiceBus\ServiceBusPublishHelper.cs:line 54 at Microsoft.VisualStudio.Services.Cloud.ServiceBusPublishHighAvailabilityConnection.PublishMessagesInternal(IVssRequestContext requestContext, String messageBusIdentifier, MessageBusMessage[] messagesToPublish, List 1 messages, Boolean publishToSecondary) in D:\v2.0\P1\_work\5\s\Vssf\Sdk\CloudServer\ServiceBus\ServiceBusPublishHighAvailabilityConnection.cs:line 165 at Microsoft.VisualStudio.Services.Cloud.ServiceBusPublishHighAvailabilityConnection.PublishHelper(IVssRequestContext requestContext, String messageBusIdentifier, MessageBusMessage[] messagesToPublish, Boolean publishToSecondary) in D:\v2.0\P1\_work\5\s\Vssf\Sdk\CloudServer\ServiceBus\ServiceBusPublishHighAvailabilityConnection.cs:line 141

We created a test pipeline and fired the build API using "triggered" as build reason and our whole pipeline is working fine.

Possible Solution: Instead of just passing a random value as build reason, pass a valid reason string as mentioned in this doc.

[Bug] Error when including azure-pipeline-variables paramtere

Hi.

I've set up a workflow to consume the Azure pipelines 1.2 workflow and it works as long as I don't include the azure-pipeline-variables property, but as soon as I include that I get this error:

image

This is the workflow code I am using:

image

I've tried quite a few variations of the content of azure-pipeline-variables but the only things that work is leaving it out or an empty string.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.