Skip to content

Commit 93eb8e4

Browse files
cf-buildpacks-engryanmoran
authored andcommitted
Updating github-config
1 parent 15cad46 commit 93eb8e4

2 files changed

Lines changed: 21 additions & 11 deletions

File tree

scripts/integration.sh

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ source "${ROOTDIR}/scripts/.util/tools.sh"
1313
function main() {
1414
local src stack harness
1515
src="$(find "${ROOTDIR}/src" -mindepth 1 -maxdepth 1 -type d )"
16-
stack="$(jq -r -S .stack "${ROOTDIR}/config.json")"
16+
stack="${CF_STACK:-$(jq -r -S .stack "${ROOTDIR}/config.json")}"
1717
harness="$(jq -r -S .integration.harness "${ROOTDIR}/config.json")"
1818

1919
IFS=$'\n' read -r -d '' -a matrix < <(
@@ -32,15 +32,16 @@ function main() {
3232

3333
echo "Running integration suite (cached: ${cached}, parallel: ${parallel})"
3434

35-
specs::run "${harness}" "${cached}" "${parallel}"
35+
specs::run "${harness}" "${cached}" "${parallel}" "${stack}"
3636
done
3737
}
3838

3939
function specs::run() {
40-
local harness cached parallel
40+
local harness cached parallel stack
4141
harness="${1}"
4242
cached="${2}"
4343
parallel="${3}"
44+
stack="${4}"
4445

4546
local nodes cached_flag serial_flag
4647
cached_flag="--cached=${cached}"
@@ -53,23 +54,24 @@ function specs::run() {
5354
fi
5455

5556
local buildpack_file
56-
buildpack_file="$(buildpack::package "1.2.3" "${cached}")"
57+
buildpack_file="$(buildpack::package "1.2.3" "${cached}" "${stack}")"
5758

5859
if [[ "${harness}" == "gotest" ]]; then
59-
specs::gotest::run "${nodes}" "${cached_flag}" "${serial_flag}" "${buildpack_file}"
60+
specs::gotest::run "${nodes}" "${cached_flag}" "${serial_flag}" "${buildpack_file}" "${stack}"
6061
else
61-
specs::ginkgo::run "${nodes}" "${cached_flag}" "${serial_flag}" "${buildpack_file}"
62+
specs::ginkgo::run "${nodes}" "${cached_flag}" "${serial_flag}" "${buildpack_file}" "${stack}"
6263
fi
6364
}
6465

6566
function specs::gotest::run() {
66-
local nodes cached_flag serial_flag buildpack_file
67+
local nodes cached_flag serial_flag buildpack_file stack
6768
nodes="${1}"
6869
cached_flag="${2}"
6970
serial_flag="${3}"
7071
buildpack_file="${4}"
72+
stack="${5}"
7173

72-
CF_STACK="${CF_STACK:-"${stack}"}" \
74+
CF_STACK="${stack}" \
7375
BUILDPACK_FILE="${BUILDPACK_FILE:-"${buildpack_file}"}" \
7476
GOMAXPROCS="${GOMAXPROCS:-"${nodes}"}" \
7577
go test \
@@ -83,13 +85,14 @@ function specs::gotest::run() {
8385
}
8486

8587
function specs::ginkgo::run(){
86-
local nodes cached_flag serial_flag buildpack_file
88+
local nodes cached_flag serial_flag buildpack_file stack
8789
nodes="${1}"
8890
cached_flag="${2}"
8991
serial_flag="${3}"
9092
buildpack_file="${4}"
93+
stack="${5}"
9194

92-
CF_STACK="${CF_STACK:-"${stack}"}" \
95+
CF_STACK="${stack}" \
9396
BUILDPACK_FILE="${BUILDPACK_FILE:-"${buildpack_file}"}" \
9497
ginkgo \
9598
-r \
@@ -102,9 +105,10 @@ function specs::ginkgo::run(){
102105
}
103106

104107
function buildpack::package() {
105-
local version cached
108+
local version cached stack
106109
version="${1}"
107110
cached="${2}"
111+
stack="${3}"
108112

109113
local name cached_flag
110114
name="buildpack-v${version}-uncached.zip"
@@ -120,6 +124,7 @@ function buildpack::package() {
120124
bash "${ROOTDIR}/scripts/package.sh" \
121125
--version "${version}" \
122126
--output "${output}" \
127+
--stack "${stack}" \
123128
"${cached_flag}" > /dev/null
124129

125130
printf "%s" "${output}"

scripts/package.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ function main() {
2121

2222
while [[ "${#}" != 0 ]]; do
2323
case "${1}" in
24+
--stack)
25+
stack="${2}"
26+
shift 2
27+
;;
28+
2429
--version)
2530
version="${2}"
2631
shift 2

0 commit comments

Comments
 (0)