Last active
October 24, 2024 21:21
-
-
Save ErikAndreas/0c30f0e1ee79a76548df9c0ebb36a870 to your computer and use it in GitHub Desktop.
Static angular site Azure DevOps pipeline Static web site deploy to Azure blob GPv2. Define variables (jsonpath) for file transform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pool: | |
vmImage: Hosted Ubuntu 1604 | |
demands: npm | |
steps: | |
- task: Npm@1 | |
displayName: 'npm install' | |
inputs: | |
verbose: false | |
- task: Npm@1 | |
displayName: 'npm run' | |
inputs: | |
command: custom | |
verbose: false | |
customCommand: 'run build:prod' | |
- task: CopyFiles@2 | |
displayName: 'Copy Files to: $(build.artifactstagingdirectory)' | |
inputs: | |
SourceFolder: dist | |
TargetFolder: '$(build.artifactstagingdirectory)' | |
- task: PublishBuildArtifacts@1 | |
displayName: 'Publish Artifact: drop' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- task: FileTransform@1 | |
displayName: 'File Transform: ' | |
inputs: | |
folderPath: '$(System.DefaultWorkingDirectory)/_<buildname>/drop' | |
fileType: json | |
targetFiles: '**/appConfig.json' | |
- task: AzureFileCopy@3 | |
displayName: 'AzureBlob File Copy' | |
inputs: | |
SourcePath: '$(System.DefaultWorkingDirectory)/_<buildname>/drop' | |
azureSubscription: '<subscription name>' | |
Destination: AzureBlob | |
storage: <storageaccountname> | |
ContainerName: '$web' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment