-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
63 lines (56 loc) · 1.43 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
branches:
include:
- master
- main
exclude:
- develop
- staging
paths:
exclude:
- README.md
pr:
branches:
include:
- master
pool:
vmImage: ubuntu-latest
steps:
# - script: dotnet build --configuration $(buildConfiguration)
# displayName: 'dotnet build $(buildConfiguration)'
- task: DotNetCoreCLI@2
inputs:
projects: Prod.Api/*.csproj
command: 'publish'
publishWebProjects: false
zipAfterPublish: false
arguments: '-c Release'
- task: NodeTool@0
inputs:
versionSource: 'spec'
versionSpec: '16.x'
- task: CmdLine@2
inputs:
script: |
npm install
npm run build
cp static/robots.txt dist/robots.txt
mkdir ../Prod.Api/bin/Release/net6.0/publish/Frontend
cp dist/* -R ../Prod.Api/bin/Release/net6.0/publish/Frontend/
workingDirectory: 'Prod.Web'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: 'Prod.Api/bin/Release/net6.0/publish/'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/drop.zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'