forked from nabinked/NToastNotify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
84 lines (72 loc) · 2.11 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
jobs:
- job: Build_Library
pool:
vmImage: ubuntu-latest
variables:
buildConfiguration: Release
steps:
- task: Npm@1
displayName: "npm install"
inputs:
workingDir: src
verbose: false
- task: Npm@1
displayName: "npm build"
inputs:
command: custom
workingDir: src
verbose: false
customCommand: "run build"
- task: UseDotNet@2
inputs:
packageType: "sdk"
version: "6.x"
- task: DotNetCoreCLI@2
displayName: "Restore"
inputs:
command: restore
- task: DotNetCoreCLI@2
displayName: "Build"
inputs:
command: build
arguments: "-c $(buildConfiguration)"
- task: DotNetCoreCLI@2
displayName: "Test"
inputs:
command: test
projects: "tests/**/*.csproj"
- task: DotNetCoreCLI@2
displayName: "Pack"
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
command: pack
configuration: $(buildConfiguration)
packagesToPack: "src/*.csproj"
nobuild: true
arguments: "-o $(Build.ArtifactStagingDirectory)"
- task: PublishBuildArtifacts@1
displayName: "Publish build artifact"
inputs:
artifactName: "package"
- job: Build_Samples
pool:
vmImage: ubuntu-latest
variables:
buildConfiguration: Release
steps:
- task: Docker@2
displayName: "Docker push image noty"
inputs:
containerRegistry: "DockerHub"
repository: "nabinked/ntoastnotify-samples"
command: "buildAndPush"
Dockerfile: "samples/Noty/Dockerfile"
tags: "noty-$(Build.BuildId)"
- task: Docker@2
displayName: "Docker push image toastr"
inputs:
containerRegistry: "DockerHub"
repository: "nabinked/ntoastnotify-samples"
command: "buildAndPush"
Dockerfile: "samples/Toastr/Dockerfile"
tags: "toastr-$(Build.BuildId)"