-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
44 lines (38 loc) · 1.23 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
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
batch: true
branches:
include:
- main
pr: none
name: $(date:yyyyMMdd)$(rev:.r)
pool:
name: Contabo
steps:
- task: Docker@2
displayName: build
inputs:
containerRegistry: Docker Hub
repository: "configcat/monday-app"
command: build
buildContext: "$(System.DefaultWorkingDirectory)"
- task: Docker@2
displayName: push
inputs:
containerRegistry: Docker Hub
command: push
repository: "configcat/monday-app"
buildContext: "$(System.DefaultWorkingDirectory)"
- script: |
mkdir -pv $(build.artifactstagingdirectory)/output
rm -rf $(build.artifactstagingdirectory)/output/*
IMAGEID=$(docker images configcat/monday-app:$(Build.BuildId) --format "{{.ID}}")
CONTAINERID=$(docker create $IMAGEID)
docker cp $CONTAINERID:/usr/share/nginx/html/. $(build.artifactstagingdirectory)/output/
docker rm $CONTAINERID
displayName: "Copy files from docker image"
- task: PublishPipelineArtifact@1
inputs:
targetPath: $(build.artifactstagingdirectory)/output/
artifact: MondayApp