Skip to content

Commit a329ccf

Browse files
committed
Scale Toolsmiths environment for ATs
* Scale to 3 Diego cells to handle AT workload * Rich Gradle output for ATs in CI * Clean more things in clean-env.sh
1 parent 04b64dc commit a329ccf

File tree

3 files changed

+34
-11
lines changed

3 files changed

+34
-11
lines changed

ci/images/release-ci-image/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ RUN cd /usr/local/bin && curl -L https://github.com/cloudfoundry-incubator/credh
2121

2222
RUN curl -L https://github.com/cloudfoundry/bosh-bootloader/releases/download/v8.4.40/bbl-v8.4.40_linux_x86-64 --output /usr/local/bin/bbl && \
2323
chmod +x /usr/local/bin/bbl
24+
25+
RUN curl -L https://github.com/cloudfoundry/bosh-cli/releases/download/v6.4.3/bosh-cli-6.4.3-linux-amd64 --output /usr/local/bin/bosh && \
26+
chmod +x /usr/local/bin/bosh

ci/scripts/acceptance-tests.sh

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ readonly DEFAULT_ORG="${DEFAULT_ORG:?must be set}"
77
readonly DEFAULT_SPACE="${DEFAULT_SPACE:?must be set}"
88
readonly SKIP_SSL_VALIDATION="${SKIP_SSL_VALIDATION:?must be set}"
99
readonly ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE:-true}"
10+
readonly DEPLOYMENT_DIRECTORY="$(mktemp -d)"
1011

1112
declare API_HOST
1213
readonly API_PORT=443
@@ -21,12 +22,28 @@ discover_environment() {
2122

2223
eval "$(bbl print-env --metadata-file "$TOOLSMITH_ENV_INPUT/metadata")"
2324

24-
API_HOST="$(jq -r .cf.api_url < "$TOOLSMITH_ENV_INPUT/metadata")"
25+
API_HOST="$(jq -r .cf.api_url <"$TOOLSMITH_ENV_INPUT/metadata")"
2526
PASSWORD="$(credhub get -n "/bosh-${env_name}/cf/cf_admin_password" -q)"
2627
CLIENT_SECRET="$(credhub get -n "/bosh-${env_name}/cf/uaa_admin_client_secret" -q)"
2728
}
2829

29-
prepare_environment() {
30+
prepare_cf_deployment() {
31+
pushd "$DEPLOYMENT_DIRECTORY" > /dev/null
32+
33+
bosh --deployment cf manifest > manifest.yml
34+
35+
cat << EOF > ops.yml
36+
- type: replace
37+
path: /instance_groups/name=diego-cell/instances
38+
value: 3
39+
EOF
40+
41+
bosh --non-interactive --deployment cf deploy --ops-file ops.yml manifest.yml
42+
43+
popd > /dev/null
44+
}
45+
46+
prepare_cf() {
3047
local test_instances_org
3148
test_instances_org="$DEFAULT_ORG-instances"
3249

@@ -50,9 +67,9 @@ run_tests() {
5067
export SPRING_CLOUD_APPBROKER_ACCEPTANCETEST_CLOUDFOUNDRY_DEFAULT_SPACE="${DEFAULT_SPACE}"
5168
export SPRING_CLOUD_APPBROKER_ACCEPTANCETEST_CLOUDFOUNDRY_SKIP_SSL_VALIDATION="${SKIP_SSL_VALIDATION}"
5269
export TESTS_BROKERAPPPATH=build/libs/spring-cloud-app-broker-acceptance-tests.jar
53-
./gradlew -PacceptanceTests \
54-
-PonlyShowStandardStreamsOnTestFailure="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE}" \
55-
:spring-cloud-app-broker-acceptance-tests:test
70+
./gradlew --console rich -PacceptanceTests \
71+
-PonlyShowStandardStreamsOnTestFailure="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE}" \
72+
:spring-cloud-app-broker-acceptance-tests:test
5673
}
5774

5875
main() {
@@ -61,11 +78,12 @@ main() {
6178
echo "Running tests against $API_HOST"
6279
echo
6380

64-
prepare_environment
81+
prepare_cf_deployment
82+
prepare_cf
6583

66-
pushd "git-repo" > /dev/null
67-
run_tests
68-
popd > /dev/null
84+
pushd "git-repo" >/dev/null
85+
run_tests
86+
popd >/dev/null
6987
}
7088

7189
main

scripts/clean-env.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,18 @@ cf routes
8787
cf target -o system -s system
8888

8989
cf delete-org -f ${TEST_INSTANCES_ORG}
90-
cf create-org ${TEST_INSTANCES_ORG} -q runaway
90+
cf create-org ${TEST_INSTANCES_ORG}
9191
cf target -o ${TEST_INSTANCES_ORG}
9292
cf create-space ${TEST_SPACE}
9393

9494
cf delete-org -f ${TEST_ORG}
95-
cf create-org ${TEST_ORG} -q runaway
95+
cf create-org ${TEST_ORG}
9696
cf target -o ${TEST_ORG}
9797
cf create-space ${TEST_SPACE}
9898

9999
cf target -o ${TEST_ORG} -s ${TEST_SPACE}
100100

101101
cf delete-service-broker test-broker-create-instance-space-per-si -f
102102
cf delete-service-broker test-broker-create-instance-with-services -f
103+
cf delete-service-broker test-broker-update-with-new-services -f
104+
cf delete-service-broker test-broker-update-with-new-services-and-target -f

0 commit comments

Comments
 (0)