microsoft / azure-pipelines-yaml

Azure Pipelines YAML examples, templates, and community interaction
MIT License
1.19k stars 924 forks source link

deploy built artifacts in container uploads both checked out projects instead of right one #586

Open msdansau opened 1 year ago

msdansau commented 1 year ago

got this successful build pipeline which just compile 2 projects from diferent repos ( the first one from GH and the another from current master devops repo) all is fine but at the end the fist one deploy built artifcat (compiled project) right in the container, however the second checkout deploy the built artifact but the previous one as well. why? i tried diferent approaches without luck...

In below YAML what it does is the folllowing: -compile and deploy built artifact from the repo of GH -And then compile and deploy the built artifact from the repo of master in devops.

*****All works well but when I see the 2 separates built artifacts containers the first one is fine which contain the built artifact for GH , but the second Artifact container contain both projects ( both built artifacts) would you know why? I added clean=true to each check out but remains the same… I also tried to add the solution path but it doesn´t find it.

YAML file

trigger:

resources: repositories:

pool: vmImage: 'windows-latest'

variables: solution: '*/.sln' buildPlatform: 'Any CPU' buildConfiguration: 'Release'

steps:

alls works well image

image

But it uploads both built artifacts for both repos into the last one . The first one upload the built artifact well. Why ?

I added the clean = true to each checkout

image

the first check out uploads the right built artifact to container image

Goal : The only artifact that should upload to DevopsARTIFACTS2 IS webapplication1. ( not included with the previous built artifact which was for GHartifact1 (webapplication2).).

image

Any pointers would be much appreciated In case anyone would like for me to add you as contributor to my devops project let me know. we need to each built artifacts only deploy the right project not both on the same.

msdansau commented 1 year ago

i have found a workaround in adding a remove artifactStagingDirectory for each new checkout so that it first clear all directory using the same job.

if you found a better workaround for using one job for many checkouts and upload each deployed artifact it`s corresponding built artifact accordingly , please detail here the steps. thanks.

ivanduplenskikh commented 1 year ago

Hi @msdansau thanks for reporting! We are working on more prioritized issues at the moment, but will get back to this one soon.