DevOps Azure Web App 파이프라인 CI/CD 구성

1. Azure Web Apps 에 대한 빌드 구성

[DevOps CI] - 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
# 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 :
- master

pool :
vmImage : ubuntu-latest

steps :
- task : NodeTool@
inputs :
versionSpec : '16.x'
displayName : 'Install Node.js'

- script : |
npm install --legacy-peer-deps
npm run build
displayName : 'npm install and build'

- bash : |
echo "--------------------"
pwd
ls -al
echo "--------------------"
displayName : 'Bash Script'

- task : ArchiveFiles@
inputs :
rootFolderOrFile : '.'
includeRootFolder : false
displayName : 'Archive Files'

- task : PublishBuildArtifacts@
displayName : 'Publish Artifact: drop'

[DevOps CI] - azure-pipelines.yml (CDN 별도 배포 프로세스 )

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
# 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 :
- master
- develop

#pool: 'zempot-agent-linux'
pool :
vmImage : ubuntu-latest

variables :
clientName : Nuxt.Client
serverName : Nuxt.Server

steps :
- task : NodeTool@
inputs :
versionSpec : '16.x'
displayName : 'Install Node.js'

- script : |
npm install --legacy-peer-deps
npm run build
displayName : 'npm install and build'

## [COMBINE]
- task : CopyFiles@
inputs :
Contents : |
.nuxt/dist/client/**
.nuxt/dist/server/**
environment/**
node_modules/**
static/**
schemes/**
.env
index.d.ts
nuxt.config.ts
package.json
TargetFolder : '$(Build.ArtifactStagingDirectory)'
CleanTargetFolder : true
displayName : 'Copy Files to: $(Build.ArtifactStagingDirectory)'

- task : ArchiveFiles@
inputs :
rootFolderOrFile : '$(Build.ArtifactStagingDirectory)'
includeRootFolder : false
archiveFile : '$(Build.ArtifactStagingDirectory)/$(serverName).zip'
replaceExistingArchive : true
displayName : 'Archive Files'

- task : PublishBuildArtifacts@
inputs :
pathToPublish : '$(Build.ArtifactStagingDirectory)/$(serverName).zip'
displayName : 'Publish Artifact: drop'

[DevOps CD] - [TEST] WebAppFrontTest

Azure Web Apps CD 파이프라인

공유하기