A LITTLE BACKGROUND:
I had created the azure CI/CD pipeline for .NET and in the CI step there is a step to gulp the css/js. Somehow I noticed that in my generated artifacts the gulped css/js are not coming. So, as per the last answer in the post (Gulp-compiled CSS folder missing from the Azure DevOps pipeline Build Artifact
) I managed to find the path of generated css/js and copied it to $(Build.ArtifactStagingDirectory)
(by adding copy files task after gulp and before publish artifact task). As in screenshot below you can see that folders marked in blue box are now copied to $(Build.ArtifactStagingDirectory)
.
NOW COMING TO QUESTION:
I think in the release pipeline, the artifact used for deploying it to azure app is "SampleWebApplication.zip". Now, I am not sure how to copy my css/js folders to azure app because when I see the azure app's site folder then still these css and js folders are not present there in assets folder.
EDIT-1
Attached the pipeline tasks' screenshot below:
Also attached the YAML for "Build Solution" and "Publish Artifact" task
Build Solution YAML:-
#Your build pipeline references an undefined variable named ‘Parameters.solution’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references the ‘BuildPlatform’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
steps:
- task: VSBuild@1
displayName: 'Build solution'
inputs:
solution: '$(Parameters.solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
Publish Artifact YAML
#Your build pipeline references an undefined variable named ‘Parameters.ArtifactName’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
steps:
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: '$(Parameters.ArtifactName)'