0
votes

I have an Angular 4 project (NG-p) in a separate repo. Also, I have my ASP.NET Core project (Core-p) in another repo. When Cope-p is built, it must contain NG-p artifacts. And I kind of managed to do it. Here's how it works:

  • when NG-p changes, VSTS builds it and puts a zip file into Azure Storage
  • Core-p gets built after that and produces ...well, something ..as part of BUILD .NET Core task
  • it grabs that zip file (NG-p artifact) from Azure Storage, unzips it and puts into $(Build.ArtifactStagingDirectory)/wwwroot/js/app folder
  • everything else are standard tasks - Test, Publish, Publish Artifact

Build succeeds. But when I open the artifacts, it contains:

  • wwwroot folder (with all NG-p files inside)
  • and myproject.zip file (everything Core-p) <= NG-p files should be there!

How can I have my NG-p files inside myproject.zip (and not have that separate wwwroot folder)?

2

2 Answers

0
votes

Yes, you can both make NG-p files and Core-p files in myproject.zip. To make NG-p files into myproject.zip, you need these tasks in your Core-p build definition:

  1. Extract Files: extract zip file in Azure and archive files in zip to $(Build.ArtifactStagingDirectory) (Destiniation Folder).
  2. Copy Files: copy files from root of your Core-p repo into $(Build.ArtifactStagingDirectory) (Target Folder).
  3. Archive Files: compress files in $(Build.ArtifactStagingDirectory) folder as zip in $(Build.ArtifactStagingDirectory)/myproject.zip (Archive file to create).

enter image description here

  1. Publish Build Artifacts: publish myproject.zip as artifact.

enter image description here

0
votes

ok, I made it working by changing the target path in my Extract Files task to the following: $(Build.ArtifactStagingDirectory)/$(Build.Repository.Name)/wwwroot/js/app

Now, all files are in the right place.