This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathazure-pipelines.yml
68 lines (58 loc) · 2.29 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
# Go
# Build your Go project.
# Add steps that test, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/go
variables:
GOBIN: '$(GOPATH)/bin' # Go binaries path
GOROOT: '/usr/local/go1.11' # Go installation path
GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code
fatsDir: '$(system.defaultWorkingDirectory)/fats'
fatsRefspec: 5f535a2689e203937c79ab87828c2af585159aca # projectriff/fats master as of 2019-07-22
cnabRiffDir: '$(system.defaultWorkingDirectory)/cnab-riff'
cnabRiffRefspec: 9bc33ad76c7382564ba96372619e2589a369853b # projectriff/cnab-riff master as of 2019-05-23
installationName: myinstall
pool:
vmImage: 'ubuntu-16.04'
name: $(Date:yyyyMMdd)$(Rev:.r)
steps:
- template: ci/go-build-step.yml
- script: go get golang.org/x/tools/cmd/goimports
displayName: 'get goimports'
- script: make
workingDirectory: '$(modulePath)'
displayName: 'build and unit test'
- bash: bash <(curl -s https://codecov.io/bash)
workingDirectory: '$(modulePath)'
displayName: 'publish code coverage'
- template: ci/fetch-fats-step.yml
- template: ci/start-minikube-steps.yml
- template: ci/install-kubectl-steps.yml
- template: ci/fetch-cnab-riff-step.yml
- script: |
./cnab/app/run
workingDirectory: '$(modulePath)'
displayName: 'install'
env:
CNAB_ACTION: install
CNAB_INSTALLATION_NAME: '$(installationName)'
MANIFEST_FILE: $(cnabRiffDir)/cnab/app/kab/manifest.yaml
LOG_LEVEL: debug
- script: kubectl get namespaces | grep -E "knative-serving|istio-system|riff-system"
displayName: 'verify install'
- script: |
./cnab/app/run
workingDirectory: '$(modulePath)'
displayName: 'uninstall'
env:
CNAB_ACTION: uninstall
CNAB_INSTALLATION_NAME: '$(installationName)'
MANIFEST_FILE: $(cnabRiffDir)/cnab/app/kab/manifest.yaml
LOG_LEVEL: debug
- script: kubectl get namespaces | ( ! grep -E "knative-serving|istio-system|riff-system" )
displayName: 'verify uninstall'
- bash: ci/diagnostics.sh
condition: failed()
workingDirectory: '$(modulePath)'
displayName: 'diagnostics'
- template: ci/publish-docker-image-steps.yml