-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure_pipeline.yml
75 lines (70 loc) · 2.47 KB
/
azure_pipeline.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
# Docker
# Build a Docker image
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
trigger:
- master
resources:
- repo: self
variables:
tag: '$(Build.BuildId)'
stages:
- stage: Build
displayName: Build image
jobs:
- job: Build
displayName: Build
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Docker@2
inputs:
containerRegistry: 'docker hub'
repository: 'borophu/bezettingsgraad'
command: 'buildAndPush'
Dockerfile: '**/Dockerfile'
tags: 'website-latest'
- stage: Webhook
displayName: Send webhook
jobs:
- job: Build
displayName: Build
pool: server
steps:
- task: InvokeRESTAPI@1
inputs:
connectionType: 'connectedServiceName'
serviceConnection: 'Discord webhook'
method: 'POST'
body: |
{
"embeds": [
{
"title": "Website build information nr.$(Build.BuildId)",
"color": 7375678,
"footer": {
"icon_url": "https://lh3.googleusercontent.com/proxy/Ok_oVXe0zkDJBhbgk4u1cJJMn2dPrNtyqKJfsibuRnUvt8r3qVrmSZ0UIhhUPjo_UDUO6kV3UYd11VGNMfNzA5VsFfN6tLmnK5myZbI2sZN38bXPfhPZykhTBZDTwnOVKoCrdtxVdUApkTPtIRtSVmdUH80",
"text": "gesponsord door bor"
},
"thumbnail": {
"url": "https://lh3.googleusercontent.com/proxy/Ok_oVXe0zkDJBhbgk4u1cJJMn2dPrNtyqKJfsibuRnUvt8r3qVrmSZ0UIhhUPjo_UDUO6kV3UYd11VGNMfNzA5VsFfN6tLmnK5myZbI2sZN38bXPfhPZykhTBZDTwnOVKoCrdtxVdUApkTPtIRtSVmdUH80"
},
"fields": [
{
"name": "Trigger",
"value": "$(Build.Reason)",
"inline": true
},
{
"name": "BuildId",
"value": "$(Build.SourceVersion)",
"inline": true
},
{
"name": "Tag",
"value": "`borophu/bezettingsgraad:website-latest`"
}
]
}
]
}
waitForCompletion: 'false'