28
28
pool-namespace :
29
29
type : string
30
30
default : ' official'
31
+
31
32
jobs :
32
33
run-integration-tests :
33
34
defaults :
47
48
repository : cloudfoundry/cli-ci
48
49
path : cli-ci
49
50
51
+ - name : Checkout cf-acceptance-tests
52
+ uses : actions/checkout@v4
53
+ with :
54
+ repository : cloudfoundry/cf-acceptance-tests
55
+ ref : release-candidate
56
+ path : cf-acceptance-tests
57
+
50
58
- id : read-min-capi
51
59
name : Read MIN CAPI
52
60
run : |
@@ -109,8 +117,16 @@ jobs:
109
117
cat metadata.json | jq -r '.name'
110
118
echo "lease-id=$lease_id" >> "${GITHUB_OUTPUT}"
111
119
120
+ - name : Set Up Go
121
+ uses : actions/setup-go@v5
122
+ with :
123
+ go-version-file : go.mod
124
+ check-latest : true
125
+
112
126
- name : Install Tools
113
127
run : |
128
+ go version
129
+
114
130
if [[ ${{ inputs.os }} =~ "windows" ]]
115
131
then
116
132
install_location=/usr/bin
@@ -138,7 +154,19 @@ jobs:
138
154
credhub --version
139
155
140
156
apt-get update
141
- apt-get install -y build-essential
157
+ apt-get install -y build-essential unzip
158
+
159
+ - name : Upload latest CAPI release
160
+ if : ${{ inputs.capi-version == 'edge' }}
161
+ run : |
162
+ capi_release_version=$(curl -s https://api.github.com/repos/cloudfoundry/capi-release/releases/latest | jq -r .tag_name)
163
+ echo "Latest CAPI release is $capi_release_version"
164
+
165
+ eval "$(bbl print-env --metadata-file metadata.json)"
166
+ env_name=$(jq -r .name metadata.json)
167
+ jq -r .bosh.jumpbox_private_key metadata.json > /tmp/${env_name}.priv
168
+
169
+ bosh upload-release "https://bosh.io/d/github.com/cloudfoundry/capi-release?v=$capi_release_version"
142
170
143
171
- name : Deploy Isolation Segment and OIDC Provider
144
172
if : ${{ inputs.capi-version == 'edge' }}
@@ -151,7 +179,9 @@ jobs:
151
179
bosh -d cf manifest > /tmp/manifest.yml
152
180
bosh interpolate /tmp/manifest.yml \
153
181
-o .github/ops-files/use-cflinuxfs3.yml \
182
+ -o cf-deployment/operations/use-internal-lookup-for-route-services.yml \
154
183
-o cf-deployment/operations/add-persistent-isolation-segment-diego-cell.yml \
184
+ -o cli-ci/ci/infrastructure/operations/use-latest-capi.yml \
155
185
-o cli-ci/ci/infrastructure/operations/add-oidc-provider.yml \
156
186
-o cli-ci/ci/infrastructure/operations/add-uaa-client-credentials.yml \
157
187
-o cli-ci/ci/infrastructure/operations/diego-cell-instances.yml \
@@ -184,14 +214,99 @@ jobs:
184
214
echo "Deployed CAPI version:"
185
215
bosh -d cf releases | grep capi
186
216
187
- - name : Set Up Go
188
- uses : actions/setup-go@v5
189
- with :
190
- go-version-file : go.mod
191
- check-latest : true
217
+ - name : Add CATS config
218
+ if : ${{ inputs.name == 'cats' }}
219
+ run : |
220
+ set -eu
221
+
222
+ ENV=$(jq -r .name metadata.json)
223
+ API="$(jq -r .cf.api_url metadata.json)"
224
+ DOMAIN=$(echo $API | sed "s/^api\.//")
225
+ CF_INT_USERNAME="admin"
226
+
227
+ jq -r .bosh.jumpbox_private_key metadata.json > /tmp/${ENV}.priv
228
+ eval "$(bbl print-env --metadata-file ./metadata.json)"
229
+
230
+ credhub login
231
+ CF_INT_PASSWORD=$(credhub get -n /bosh-$ENV/cf/cf_admin_password | bosh interpolate --path /value -)
232
+
233
+ cat << EOF | jq -S . > cats_config.json
234
+ {
235
+ "admin_password": "${CF_INT_PASSWORD}",
236
+ "admin_user": "${CF_INT_USERNAME}",
237
+ "api": "${API}",
238
+ "apps_domain": "${DOMAIN}",
239
+ "backend" : "diego",
240
+ "broker_start_timeout": 330,
241
+ "cf_push_timeout": 210,
242
+ "default_timeout": 120,
243
+ "long_curl_timeout": 210,
244
+ "skip_ssl_validation": true,
245
+ "use_http": true,
246
+ "include_apps": true,
247
+ "include_backend_compatibility": false,
248
+ "include_container_networking": true,
249
+ "include_detect": true,
250
+ "include_docker": true,
251
+ "include_internet_dependent": true,
252
+ "include_isolation_segments": true,
253
+ "isolation_segment_name": "persistent_isolation_segment",
254
+ "include_private_docker_registry": false,
255
+ "include_route_services": true,
256
+ "include_routing": true,
257
+ "include_routing_isolation_segments": false,
258
+ "include_security_groups": true,
259
+ "include_services": true,
260
+ "include_service_discovery": true,
261
+ "include_service_instance_sharing": true,
262
+ "include_ssh": true,
263
+ "include_sso": false,
264
+ "include_tasks": true,
265
+ "include_tcp_routing": true,
266
+ "include_v3": true,
267
+ "include_zipkin": true
268
+ }
269
+ EOF
270
+
271
+ make build
272
+ echo "$PWD/out" >> $GITHUB_PATH
273
+ export PATH="$PWD/out:$PATH"
274
+ cf version
275
+
276
+ export CF_USERNAME=${CF_INT_USERNAME}
277
+ export CF_PASSWORD=${CF_INT_PASSWORD}
278
+ cf api ${API} --skip-ssl-validation
279
+ cf auth
280
+ cf enable-feature-flag diego_docker
281
+ cf enable-feature-flag service_instance_sharing
282
+
283
+ - name : Run CATS Tests
284
+ if : ${{ inputs.name == 'cats' }}
285
+ run : |
286
+ set -xeu
287
+
288
+ export CONFIG
289
+ CONFIG=$(mktemp)
290
+
291
+ original_config="${PWD}/cats_config.json"
292
+ cp ${original_config} ${CONFIG}
293
+
294
+ cd ./cf-acceptance-tests
295
+ export CF_DIAL_TIMEOUT=11
296
+ export CF_PLUGIN_HOME=$HOME
297
+ go version
298
+
299
+ ./bin/test \
300
+ --keep-going \
301
+ --randomize-all \
302
+ --skip-package=helpers \
303
+ --nodes="12" \
304
+ --flake-attempts=2 \
305
+ --timeout="2h" \
306
+ --no-color
192
307
193
308
- name : Run Integration Tests
194
- if : ${{ !inputs.run-with-client-creds }}
309
+ if : ${{ !inputs.run-with-client-creds && inputs.name != 'cats' }}
195
310
run : |
196
311
ENV=$(cat metadata.json | jq -r '.name')
197
312
jq -r .bosh.jumpbox_private_key metadata.json > /tmp/${ENV}.priv
0 commit comments