forked from GoogleCloudPlatform/aspnet-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
116 lines (111 loc) · 4.89 KB
/
cloudbuild.yaml
File metadata and controls
116 lines (111 loc) · 4.89 KB
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
# This file defines the build script for all supported aspnetcore images.
# _DOCKER_NAMESPACE, the repository where to push the images.
# _TAG, the tag to use for the published images.
steps:
# Build the generator for testing later.
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', 'generator', './dockerfile_generator' ]
id: 'generator-build'
waitFor: ['-']
# .NET Core 1.0.x
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', '${_DOCKER_NAMESPACE}/aspnetcore:1.0-${_TAG}',
'--no-cache', '--pull', './versions/aspnetcore-1.0/image' ]
id: 'aspnetcore-1-0-build'
waitFor: ['-']
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', '${_DOCKER_NAMESPACE}/aspnetcore:1.0-${_TAG}',
'--config', '/workspace/versions/aspnetcore-1.0/structural_tests/aspnet.yaml', '-v']
id: 'aspnetcore-1-0-test'
waitFor: [ 'aspnetcore-1-0-build' ]
- name: generator
args: [ './versions/aspnetcore-1.0/functional_tests/published', '${_DOCKER_NAMESPACE}/aspnetcore:1.0-${_TAG}' ]
id: 'generator-run-1-0'
waitFor: [ 'generator-build', 'aspnetcore-1-0-build' ]
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', 'test-app-1-0', './versions/aspnetcore-1.0/functional_tests/published' ]
id: 'test-app-build-1-0'
waitFor: [ 'generator-run-1-0' ]
- name: test-app-1-0
id: 'test-app-run-1-0'
entrypoint: 'bash'
args: [ '-c', '[[ "$(dotnet /app/app.dll)" == "Hello World 1.0!" ]]' ]
waitFor: [ 'test-app-build-1-0' ]
# .NET Core 1.1.x
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', '${_DOCKER_NAMESPACE}/aspnetcore:1.1-${_TAG}',
'--no-cache', '--pull', './versions/aspnetcore-1.1/image' ]
id: 'aspnetcore-1-1-build'
waitFor: ['-']
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', '${_DOCKER_NAMESPACE}/aspnetcore:1.1-${_TAG}',
'--config', '/workspace/versions/aspnetcore-1.1/structural_tests/aspnet.yaml', '-v']
id: 'aspnetcore-1-1-test'
waitFor: [ 'aspnetcore-1-1-build' ]
- name: generator
args: [ './versions/aspnetcore-1.1/functional_tests/published', '${_DOCKER_NAMESPACE}/aspnetcore:1.1-${_TAG}' ]
id: 'generator-run-1-1'
waitFor: [ 'generator-build', 'aspnetcore-1-1-build' ]
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', 'test-app-1-1', './versions/aspnetcore-1.1/functional_tests/published' ]
id: 'test-app-build-1-1'
waitFor: [ 'generator-run-1-1' ]
- name: test-app-1-1
id: 'test-app-run-1-1'
entrypoint: 'bash'
args: [ '-c', '[[ "$(dotnet /app/app.dll)" == "Hello World 1.1!" ]]' ]
waitFor: [ 'test-app-build-1-1' ]
# .NET Core 2.0.x
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', '${_DOCKER_NAMESPACE}/aspnetcore:2.0-${_TAG}',
'--no-cache', '--pull', './versions/aspnetcore-2.0/image' ]
id: 'aspnetcore-2-0-build'
waitFor: ['-']
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', '${_DOCKER_NAMESPACE}/aspnetcore:2.0-${_TAG}',
'--config', '/workspace/versions/aspnetcore-2.0/structural_tests/aspnet.yaml', '-v']
id: 'aspnetcore-2-0-test'
waitFor: [ 'aspnetcore-2-0-build' ]
- name: generator
args: [ './versions/aspnetcore-2.0/functional_tests/published', '${_DOCKER_NAMESPACE}/aspnetcore:2.0-${_TAG}' ]
id: 'generator-run-2-0'
waitFor: [ 'generator-build', 'aspnetcore-2-0-build' ]
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', 'test-app-2-0', './versions/aspnetcore-2.0/functional_tests/published' ]
id: 'test-app-build-2-0'
waitFor: [ 'generator-run-2-0' ]
- name: test-app-2-0
id: 'test-app-run-2-0'
entrypoint: 'bash'
args: [ '-c', '[[ "$(dotnet /app/app.dll)" == "Hello World 2.0!" ]]' ]
waitFor: [ 'test-app-build-2-0' ]
# .NET Core 2.1.x
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', '${_DOCKER_NAMESPACE}/aspnetcore:2.1-${_TAG}',
'--no-cache', '--pull', './versions/aspnetcore-2.1/image' ]
id: 'aspnetcore-2-1-build'
waitFor: ['-']
- name: gcr.io/gcp-runtimes/structure_test
args: ['-i', '${_DOCKER_NAMESPACE}/aspnetcore:2.1-${_TAG}',
'--config', '/workspace/versions/aspnetcore-2.1/structural_tests/aspnet.yaml', '-v']
id: 'aspnetcore-2-1-test'
waitFor: [ 'aspnetcore-2-1-build' ]
- name: generator
args: [ './versions/aspnetcore-2.1/functional_tests/published', '${_DOCKER_NAMESPACE}/aspnetcore:2.1-${_TAG}' ]
id: 'generator-run-2-1'
waitFor: [ 'generator-build', 'aspnetcore-2-1-build' ]
- name: gcr.io/cloud-builders/docker
args: [ 'build', '-t', 'test-app-2-1', './versions/aspnetcore-2.1/functional_tests/published' ]
id: 'test-app-build-2-1'
waitFor: [ 'generator-run-2-1' ]
- name: test-app-2-1
id: 'test-app-run-2-1'
entrypoint: 'bash'
args: [ '-c', '[[ "$(dotnet /app/app.dll)" == "Hello World 2.1!" ]]' ]
waitFor: [ 'test-app-build-2-1' ]
# Publish the images.
images:
- '${_DOCKER_NAMESPACE}/aspnetcore:1.0-${_TAG}'
- '${_DOCKER_NAMESPACE}/aspnetcore:1.1-${_TAG}'
- '${_DOCKER_NAMESPACE}/aspnetcore:2.0-${_TAG}'
- '${_DOCKER_NAMESPACE}/aspnetcore:2.1-${_TAG}'