forked from UvA-FNWI/IguideME
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
48 lines (42 loc) · 1.98 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
trigger:
- master
variables:
- group: k8s
pool: k8s
jobs:
- job: build
steps:
- script: |
set -euxo pipefail
docker build -f Dockerfile -t "fnwicr.azurecr.io/iguideme:latest" .
docker push "fnwicr.azurecr.io/iguideme:latest"
displayName: Build Docker container
workingDirectory: ./IguideME.Web
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
- script: |
set -euxo pipefail
docker build -f Dockerfile -t "fnwicr.azurecr.io/iguideme-demo:latest" .
docker push "fnwicr.azurecr.io/iguideme-demo:latest"
displayName: Build Docker container for demo app
workingDirectory: ./IguideME.Web/wwwroot
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
- script: |
set -euxo pipefail
VERSION="0.${BUILD_BUILDNUMBER}"
helm package --version "${VERSION}" --app-version "${VERSION}" charts/iguideme-demo
helm push "iguideme-demo-${VERSION}.tgz" oci://fnwicr.azurecr.io/helm
curl "https://k8s.datanose.nl/gitops-updater?name=iguideme-demo&secret=${UPDATER_SECRET}&version=${VERSION}"
displayName: Build Helm chart for demo app and push to registry
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
env:
UPDATER_SECRET: $(DEPLOY_SECRET)
- script: |
set -euxo pipefail
VERSION="0.${BUILD_BUILDNUMBER}"
helm package --version "${VERSION}" --app-version "${VERSION}" charts/iguideme
helm push "iguideme-${VERSION}.tgz" oci://fnwicr.azurecr.io/helm
curl "https://k8s.datanose.nl/gitops-updater?name=iguideme&secret=${UPDATER_SECRET}&version=${VERSION}"
displayName: Build Helm chart and push to registry
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
env:
UPDATER_SECRET: $(DEPLOY_SECRET)