-
Notifications
You must be signed in to change notification settings - Fork 5
/
delivery.yaml
executable file
·124 lines (121 loc) · 4.53 KB
/
delivery.yaml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Use the script `./generate_pipelines.sh` piped into a file to generate the contents of the CDP delivery file
version: "2017-09-20"
pipeline:
- id: Build
overlay: fabric/scala_overlay
cache:
paths:
- ~/.sbt
- ~/.ivy2
type: script
vm: large
commands:
- desc: Test the Gateway Operator
cmd: |
sbt clean test assembly
- desc: Build Test Docker image and publish to PierOne
cmd: |
echo "Building app image ${CDP_BUILD_VERSION}"
TAG="registry-write.opensource.zalan.do/fabric/gateway-k8s-operator-review:${CDP_BUILD_VERSION}"
docker build -f docker/svc/Dockerfile -t "${TAG}" .
docker push "${TAG}"
- desc: Build LIVE Docker image and publish to PierOne
cmd: |
if [ -z "$CDP_PULL_REQUEST_NUMBER" ]; then
echo "Building app image ${CDP_BUILD_VERSION}"
TAG="registry-write.opensource.zalan.do/fabric/gateway-k8s-operator:${CDP_BUILD_VERSION}"
docker build -f docker/svc/Dockerfile -t "${TAG}" .
docker push "${TAG}"
fi
- desc: Build the end to end test image
cmd: |
if [ "$CDP_PULL_REQUEST_NUMBER" ]; then
TAG="registry-write.opensource.zalan.do/fabric/gateway-e2e-tests:${CDP_BUILD_VERSION}"
docker build -t "${TAG}" -f docker/e2e/Dockerfile .
docker push "${TAG}"
fi
- id: Playground-Operator-Deployment
desc: Deploy the metacontroller CRDs and Operator loop
type: process
process: microservice_standard_deployment
when:
branch:
exclude: master
target: &testCluster playground
config:
apply_permanent_resources:
env:
DEPLOYMENT_PATH: &operatorDeployPath deploy/operator
NAMESPACE: &namespace fabric
CLUSTER: *testCluster
IMAGE: &operatorImageName registry.opensource.zalan.do/fabric/gateway-k8s-operator-review
VERSION: #{CDP_BUILD_VERSION}
COMPOSITE_CONTROLLER_NAME: test-gateway-operator
CRD_KIND: TestFabricGateway
CRD_SINGULAR: testfabricgateway
CRD_PLURAL: testfabricgateways
CRD_SHORT_NAME: tfg
VERSIONED_HOSTS_BASE_DOMAIN: "playground.zalan.do"
ANNOTATION_ALLOWLIST: "zalando.org/aws-load-balancer-http2,zalando.org/skipper-loadbalancer"
ADDITIONAL_FILTER_ALLOWLIST: "fadeIn,tee"
- id: E2E-TestApp-Deployment
desc: Deploy the test application
type: process
process: microservice_standard_deployment
when:
branch:
exclude: master
target: *testCluster
config:
apply_permanent_resources:
env:
DEPLOYMENT_PATH: deploy/test-app
NAMESPACE: *namespace
CLUSTER: *testCluster
- id: E2E-Tests
type: process
desc: End to End tests to be run against test fabric gateway
target: *testCluster
process: microservice_standard_test
debug_mode: true
when:
branch:
exclude: master
config:
apply_manifests:
env:
DEPLOYMENT_PATH: deploy/e2e-test-resources
end2end_tests:
spec:
restartPolicy: Never
containers:
- name: test-runner
image: registry.opensource.zalan.do/fabric/gateway-e2e-tests:#{CDP_BUILD_VERSION}
resources:
requests:
cpu: 1
memory: "2Gi"
limits:
memory: "2Gi"
env:
- name: AUT_HOST
value: test-gateway-operator.playground.zalan.do
- name: OAUTH2_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: test-gateway-operator-credentials
key: test-app-token-secret
- name: WHITELIST_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: test-gateway-operator-credentials-wl
key: test-app-token-secret
- name: RESOURCE_WHITELIST_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: test-gateway-operator-credentials-resource-wl
key: test-app-token-secret
command: ["sh", "-c"]
args:
- |
sbt -DautHost=$AUT_HOST -DoauthToken=$OAUTH2_ACCESS_TOKEN -DwhiteListToken=$WHITELIST_ACCESS_TOKEN -DresourceWhiteListToken=$RESOURCE_WHITELIST_ACCESS_TOKEN -Dsun.net.http.allowRestrictedHeaders=true e2e:test