Skip to content
This repository was archived by the owner on Jul 17, 2018. It is now read-only.

Commit cdf2200

Browse files
committed
Revert tests to simple, direct curl
1 parent cddf6ee commit cdf2200

File tree

8 files changed

+68
-76
lines changed

8 files changed

+68
-76
lines changed

ci/pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ jobs:
216216
- warden-stemcell/stemcell.tgz
217217
vars:
218218
deployment_name: *jenkins-deployment-name
219-
- task: test-jenkins-run-job
220-
file: devtools-boshrelease-ci/ci/tasks/test-jenkins-run-job.yml
219+
- task: test-jenkins-curl
220+
file: devtools-boshrelease-ci/ci/tasks/test-jenkins-curl.yml
221221
params:
222222
BOSH_DEPLOYMENT: *jenkins-deployment-name
223223
- put: bosh-deployment # Destroy Jenkins instance

ci/tasks/test-gerrit-curl.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ run:
1010
args:
1111
- -c
1212
- |
13-
cd bbl-state/bbl-state
14-
source <(bbl print-env)
15-
sleep 10 # Sleeping because this curl lacks the --retry-connrefused
16-
bosh -d $BOSH_DEPLOYMENT ssh gerrit/0 -c "curl -S --retry-max-time 300 --retry-delay 1 --retry 300 http://localhost:8080"
13+
pushd bbl-state/bbl-state
14+
source <(bbl print-env)
15+
JUMPBOX_USER="jumpbox"; export JUMPBOX_USER
16+
JUMPBOX_HOST=$(bosh int <(bbl outputs) --path /jumpbox_url | cut -d: -f1); export JUMPBOX_HOST
17+
# set up jumpbox ssh tunnel
18+
instance_info=$(bosh --json instances -i); export instance_info
19+
ip=$(jq -r .Tables[0].Rows[0].ips <<< "$instance_info")
20+
# shellcheck disable=SC2029
21+
ssh -o StrictHostKeyChecking=no -fNnL "8080:$ip:8080" -i "$JUMPBOX_PRIVATE_KEY" "$JUMPBOX_USER@$JUMPBOX_HOST"
22+
trap "pkill ssh" EXIT
23+
sleep 10
24+
curl -S --retry-max-time 300 --retry-delay 1 --retry 300 http://localhost:8080/
25+
popd

ci/tasks/test-jenkins-curl.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
platform: linux
2+
image_resource:
3+
type: docker-image
4+
source:
5+
repository: engineerbetter/pcf-ops
6+
inputs:
7+
- name: bbl-state
8+
- name: devtools-boshrelease-ci
9+
run:
10+
path: /bin/bash
11+
args:
12+
- -c
13+
- |
14+
pushd bbl-state/bbl-state
15+
source <(bbl print-env)
16+
JUMPBOX_USER="jumpbox"; export JUMPBOX_USER
17+
JUMPBOX_HOST=$(bosh int <(bbl outputs) --path /jumpbox_url | cut -d: -f1); export JUMPBOX_HOST
18+
# set up jumpbox ssh tunnel
19+
instance_info=$(bosh --json instances -i); export instance_info
20+
ip=$(jq -r .Tables[0].Rows[0].ips <<< "$instance_info")
21+
# shellcheck disable=SC2029
22+
ssh -o StrictHostKeyChecking=no -fNnL "8080:$ip:8080" -i "$JUMPBOX_PRIVATE_KEY" "$JUMPBOX_USER@$JUMPBOX_HOST"
23+
trap "pkill ssh" EXIT
24+
sleep 10
25+
curl -S --retry-max-time 300 --retry-delay 1 --retry 300 http://localhost:8080/login
26+
popd

ci/tasks/test-jenkins-run-job.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

ci/tasks/test-jenkins-run-job.xml

Lines changed: 0 additions & 37 deletions
This file was deleted.

ci/tasks/test-jenkins-run-job.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

ci/tasks/test-nexus-curl.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,17 @@ run:
1010
args:
1111
- -c
1212
- |
13-
cd bbl-state/bbl-state
14-
source <(bbl print-env)
15-
sleep 10 # Sleeping because this curl lacks the --retry-connrefused
16-
bosh -d $BOSH_DEPLOYMENT ssh nexus/0 -c "curl -S --retry-max-time 300 -- retry-delay 1 --retry 300 http://localhost:8081/"
13+
pushd bbl-state/bbl-state
14+
source <(bbl print-env)
15+
JUMPBOX_USER="jumpbox"; export JUMPBOX_USER
16+
JUMPBOX_HOST=$(bosh int <(bbl outputs) --path /jumpbox_url | cut -d: -f1); export JUMPBOX_HOST
17+
# set up jumpbox ssh tunnel
18+
instance_info=$(bosh --json instances -i); export instance_info
19+
ip=$(jq -r .Tables[0].Rows[0].ips <<< "$instance_info")
20+
# shellcheck disable=SC2029
21+
ssh -o StrictHostKeyChecking=no -fNnL "8081:$ip:8081" -i "$JUMPBOX_PRIVATE_KEY" "$JUMPBOX_USER@$JUMPBOX_HOST"
22+
trap "pkill ssh" EXIT
23+
sleep 10
24+
curl -S --retry-max-time 300 --retry-delay 1 --retry 300 http://localhost:8081/
25+
popd
26+

ci/tasks/test-sonarqube-curl.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ run:
1010
args:
1111
- -c
1212
- |
13-
cd bbl-state/bbl-state
14-
source <(bbl print-env)
15-
sleep 10 # Sleeping because this curl lacks the --retry-connrefused
16-
bosh -d $BOSH_DEPLOYMENT ssh sonarqube/0 -c "curl -S --retry-max-time 300 --retry-delay 1 --retry 300 http://localhost:9000"
13+
pushd bbl-state/bbl-state
14+
source <(bbl print-env)
15+
JUMPBOX_USER="jumpbox"; export JUMPBOX_USER
16+
JUMPBOX_HOST=$(bosh int <(bbl outputs) --path /jumpbox_url | cut -d: -f1); export JUMPBOX_HOST
17+
# set up jumpbox ssh tunnel
18+
instance_info=$(bosh --json instances -i); export instance_info
19+
ip=$(jq -r .Tables[0].Rows[0].ips <<< "$instance_info")
20+
# shellcheck disable=SC2029
21+
ssh -o StrictHostKeyChecking=no -fNnL "9000:$ip:9000" -i "$JUMPBOX_PRIVATE_KEY" "$JUMPBOX_USER@$JUMPBOX_HOST"
22+
trap "pkill ssh" EXIT
23+
sleep 10
24+
curl -S --retry-max-time 300 --retry-delay 1 --retry 300 http://localhost:9000/
25+
popd

0 commit comments

Comments
 (0)