Closed VitalyLebedev closed 5 years ago
Hi Vitaly, Yes, the process is compiling and downloading all the apps into one folder, which could lead to this problem. I am using similar way around: publishing only packages, which are filtered by given app name (name of the app which I am compiling, in case it is same as build name, I am using the build name for this). Dropping dependencies to separate folder will not help me much, when I am compiling tree of depending apps, which are in the repository included as subrepositories. Even when I am "compiling" them, I sometime want to publish them (when I have clean container), or I do not want to publish them (release of the compiled app to existing QA environment, where the dependencies are deployed as part of their own deployment pipeline).
In generally, I am compiling the app in same folder as the dependencies, because the compiled app could be dependency for another app I will compile. I cannot say which resulting apps the user want to use in next steps, thus your workaround is what I will recommend. I am doing same when I am publishing the artifacts of the build pipeline too - copying the wanted app files to artifacts folder.
I am using this task to do so in my YAML template:
- task: CopyFiles@2
displayName: Copy Apps to Staging
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: ${{ format('**\*{0}*.app',parameters.AppName) }}
TargetFolder: '$(Build.ArtifactStagingDirectory)'
CleanTargetFolder: true
OverWrite: true
flattenFolders: true
Where the parameters.AppName is name of the app from some variable or taken from build pipeline name.
Hi Kamil, Thanks for your quick response and clarification of the reason for this behavior. We will proceed with suggested workaround. Let’s close the issue. Regards, Vitaliy
As result of compileappTask for AppName\Test folder, dependency app is in the root folder i.e. AppName\Test instead of AppName\Test\.alpackages. This causes Publish App to Container task to fail as it tries to publish dependency [appname].app which is already published. ##[error]This Extension cannot be published as it has the same Publisher, Name, and Version as a previously published Extension._ Suggestion is to either add possibility to define the name of file to publish in Publish App to Container task or dependency app file should be in .alpackages folder after compileappTask executed. PS: our current workaround was to add Delete files task with pattern to get rid of dependency app file before publish task.