Skip to content

Commit c7f09a6

Browse files
add setup job
1 parent 1bf5a93 commit c7f09a6

1 file changed

Lines changed: 91 additions & 0 deletions

File tree

pipeline-shellspec.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,65 @@ jobs:
112112
vars:
113113
ccr-cf-cli-version: 7
114114

115+
- name: setup
116+
serial: true
117+
public: true
118+
plan:
119+
- in_parallel:
120+
- get: cf-cli-resource
121+
passed: [build]
122+
- get: bookstore-service-broker
123+
- task: build-test-app-image
124+
privileged: true
125+
file: cf-cli-resource/ci/tasks/build-image.yml
126+
input_mapping:
127+
project: cf-cli-resource
128+
params:
129+
CONTEXT: spec/fixture/static-app
130+
- in_parallel:
131+
- put: test-app-image
132+
params:
133+
image: image/image.tar
134+
get_params: {skip_download: true}
135+
- put: prepare-cloud-foundry
136+
resource: cloud-foundry
137+
params:
138+
commands:
139+
- command: create-org
140+
- command: create-space
141+
get_params: {skip_download: true}
142+
- in_parallel:
143+
- put: sync-service-broker
144+
resource: cloud-foundry
145+
params:
146+
commands:
147+
- command: push
148+
app_name: bookstore-service-broker
149+
path: bookstore-service-broker/build/libs/bookstore-service-broker-0.0.1.BUILD-SNAPSHOT.jar
150+
manifest: bookstore-service-broker/deploy/cloudfoundry/manifest.yml
151+
- command: create-service-broker
152+
service_broker: bookstore
153+
username: admin
154+
password: supersecret
155+
url: https://bookstore-service-broker.((ccr-cf-apps-domain))
156+
- command: enable-service-access
157+
service_broker: bookstore
158+
- put: async-service-broker
159+
resource: cloud-foundry
160+
params:
161+
commands:
162+
- command: push
163+
app_name: bookstore-service-broker-async
164+
path: bookstore-service-broker/build/libs/bookstore-service-broker-0.0.1.BUILD-SNAPSHOT.jar
165+
manifest: bookstore-service-broker/deploy/cloudfoundry/manifest.yml
166+
- command: create-service-broker
167+
service_broker: bookstore-async
168+
username: admin
169+
password: supersecret
170+
url: https://bookstore-service-broker-async.((ccr-cf-apps-domain))
171+
- command: enable-service-access
172+
service_broker: bookstore-async
173+
115174
resources:
116175
- name: cf-cli-resource
117176
type: git
@@ -141,6 +200,31 @@ resources:
141200
username: ((docker.username))
142201
password: ((docker.password))
143202

203+
- name: test-app-image
204+
type: registry-image
205+
icon: docker
206+
source:
207+
repository: docker.nulldriver.com/test-app
208+
tag: latest
209+
username: ((docker-private.username))
210+
password: ((docker-private.password))
211+
212+
- name: bookstore-service-broker
213+
type: git
214+
icon: github
215+
source:
216+
uri: git@github.com:nulldriver/bookstore-service-broker.git
217+
private_key: ((git_key.private_key))
218+
219+
- name: cloud-foundry
220+
type: cf-cli-resource
221+
source:
222+
api: ((ccr-cf-api))
223+
username: ((cf.username))
224+
password: ((cf.password))
225+
org: service-brokers
226+
space: bookstore
227+
144228
- name: trivy
145229
type: registry-image
146230
icon: docker
@@ -156,3 +240,10 @@ resources:
156240
owner: aquasecurity
157241
repository: trivy-db
158242
access_token: ((github_access_token))
243+
244+
resource_types:
245+
- name: cf-cli-resource
246+
type: registry-image
247+
source:
248+
repository: nulldriver/cf-cli-resource
249+
tag: latest

0 commit comments

Comments
 (0)