From 35873ee517c75fbda48439cc0d032a103f370d91 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 30 Sep 2019 11:14:36 -0700 Subject: [PATCH 01/12] update Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76e6fd3..17c2511 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ # Master +- Test staged binaries on Travis + -------------------------------------------------------------------------------- # 156 (2019-09-12) From 6a8aa1e2b03e814d5e0b2fd5280a25674ebc5918 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 30 Sep 2019 11:15:09 -0700 Subject: [PATCH 02/12] update travis matrix to change vendor url --- .travis.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index d5449a3..b6d220d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,11 +25,20 @@ jobs: if: branch = master name: Run Hatchet script: "bundle exec rspec" + +matrix: + include: + - env: TESTFOLDER=test/run-deps + - env: TESTFOLDER=test/run-deps + VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - env: TESTFOLDER=test/run-versions + - env: TESTFOLDER=test/run-versions + VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - env: TESTFOLDER=test/run-features + - env: TESTFOLDER=test/run-features + VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + env: - matrix: - - TESTFOLDER=test/run-deps - - TESTFOLDER=test/run-versions - - TESTFOLDER=test/run-features global: - HATCHET_RETRIES=3 - IS_RUNNING_ON_CI=true From 7c82017a0e1ef668b059664f1b39ff2fcc33878b Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 30 Sep 2019 13:19:38 -0700 Subject: [PATCH 03/12] run each matrix item twice, with VENDOR_URL update --- .travis.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index b6d220d..961ba73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,20 +25,14 @@ jobs: if: branch = master name: Run Hatchet script: "bundle exec rspec" - -matrix: - include: - - env: TESTFOLDER=test/run-deps - - env: TESTFOLDER=test/run-deps - VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK - - env: TESTFOLDER=test/run-versions - - env: TESTFOLDER=test/run-versions - VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK - - env: TESTFOLDER=test/run-features - - env: TESTFOLDER=test/run-features - VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK - env: + matrix: + - TESTFOLDER=test/run-deps + - TESTFOLDER=test/run-deps VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-versions + - TESTFOLDER=test/run-versions VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-features + - TESTFOLDER=test/run-features VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK global: - HATCHET_RETRIES=3 - IS_RUNNING_ON_CI=true From 74bc1d40496fa3b1d5b9b2b260a0700449eee028 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 30 Sep 2019 15:22:29 -0700 Subject: [PATCH 04/12] pass vendor url to docker container --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 961ba73..f545c75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,11 +10,11 @@ before_script: script: - docker build --pull --tag travis-build-cedar-14 --file $(pwd)/builds/cedar-14.Dockerfile . - - docker run --rm -e "STACK=cedar-14" travis-build-cedar-14 bash $TESTFOLDER + - docker run --rm -e "STACK=cedar-14" -e "VENDOR_URL=$VENDOR_URL" travis-build-cedar-14 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-16 --file $(pwd)/builds/heroku-16.Dockerfile . - - docker run --rm -e "STACK=heroku-16" travis-build-heroku-16 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-16" -e "VENDOR_URL=$VENDOR_URL" travis-build-heroku-16 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-18 --file $(pwd)/builds/heroku-18.Dockerfile . - - docker run --rm -e "STACK=heroku-18" travis-build-heroku-18 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-18" -e "VENDOR_URL=$VENDOR_URL" travis-build-heroku-18 bash $TESTFOLDER jobs: include: From ce6657d5feb401b254a48544f8c82e57507d66e0 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 8 Oct 2019 09:54:17 -0700 Subject: [PATCH 05/12] use correct override var BUILDPACK_VENDOR_URL instead of vendor_url --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index f545c75..9d7fae6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,11 +10,11 @@ before_script: script: - docker build --pull --tag travis-build-cedar-14 --file $(pwd)/builds/cedar-14.Dockerfile . - - docker run --rm -e "STACK=cedar-14" -e "VENDOR_URL=$VENDOR_URL" travis-build-cedar-14 bash $TESTFOLDER + - docker run --rm -e "STACK=cedar-14" -e "BUILDPACK_VENDOR_URL=$BUILDPACK_VENDOR_URL" travis-build-cedar-14 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-16 --file $(pwd)/builds/heroku-16.Dockerfile . - - docker run --rm -e "STACK=heroku-16" -e "VENDOR_URL=$VENDOR_URL" travis-build-heroku-16 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-16" -e "BUILDPACK_VENDOR_URL=$BUILDPACK_VENDOR_URL" travis-build-heroku-16 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-18 --file $(pwd)/builds/heroku-18.Dockerfile . - - docker run --rm -e "STACK=heroku-18" -e "VENDOR_URL=$VENDOR_URL" travis-build-heroku-18 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-18" -e "BUILDPACK_VENDOR_URL=$BUILDPACK_VENDOR_URL" travis-build-heroku-18 bash $TESTFOLDER jobs: include: @@ -28,11 +28,11 @@ jobs: env: matrix: - TESTFOLDER=test/run-deps - - TESTFOLDER=test/run-deps VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-deps BUILDPACK_VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK - TESTFOLDER=test/run-versions - - TESTFOLDER=test/run-versions VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-versions BUILDPACK_VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK - TESTFOLDER=test/run-features - - TESTFOLDER=test/run-features VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-features BUILDPACK_VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK global: - HATCHET_RETRIES=3 - IS_RUNNING_ON_CI=true From 03c12e808155cb150921cce2eced57a3f5224793 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 14 Oct 2019 12:29:12 -0700 Subject: [PATCH 06/12] update to use staging binaries env var --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9d7fae6..703f4a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,11 +10,11 @@ before_script: script: - docker build --pull --tag travis-build-cedar-14 --file $(pwd)/builds/cedar-14.Dockerfile . - - docker run --rm -e "STACK=cedar-14" -e "BUILDPACK_VENDOR_URL=$BUILDPACK_VENDOR_URL" travis-build-cedar-14 bash $TESTFOLDER + - docker run --rm -e "STACK=cedar-14" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-cedar-14 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-16 --file $(pwd)/builds/heroku-16.Dockerfile . - - docker run --rm -e "STACK=heroku-16" -e "BUILDPACK_VENDOR_URL=$BUILDPACK_VENDOR_URL" travis-build-heroku-16 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-16" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-heroku-16 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-18 --file $(pwd)/builds/heroku-18.Dockerfile . - - docker run --rm -e "STACK=heroku-18" -e "BUILDPACK_VENDOR_URL=$BUILDPACK_VENDOR_URL" travis-build-heroku-18 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-18" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-heroku-18 bash $TESTFOLDER jobs: include: @@ -28,11 +28,11 @@ jobs: env: matrix: - TESTFOLDER=test/run-deps - - TESTFOLDER=test/run-deps BUILDPACK_VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-deps USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging - TESTFOLDER=test/run-versions - - TESTFOLDER=test/run-versions BUILDPACK_VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-versions USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging - TESTFOLDER=test/run-features - - TESTFOLDER=test/run-features BUILDPACK_VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-features USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging global: - HATCHET_RETRIES=3 - IS_RUNNING_ON_CI=true From dc694d4712f9439ac46bc210dacaf5f8c1a98be0 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 24 Oct 2019 08:52:33 -0700 Subject: [PATCH 07/12] test for 3.5 warn should pass when using staged binaries --- test/run-versions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/run-versions b/test/run-versions index 2526238..023e418 100755 --- a/test/run-versions +++ b/test/run-versions @@ -73,10 +73,14 @@ testPython3_5() { testPython3_5_warn() { compile "python3_5_warn" - if [[ $STACK = "cedar-14" ]]; then + if [[ $STACK = "cedar-14" ]] ; then assertCaptured "python-3.5.3" assertCaptured "security update!" assertCapturedError + elif [[ -n ${USE_STAGING_BINARIES} ]]; then + assertCaptured "python-3.5.3" + assertCaptured "security update!" + assertCapturedSuccess else assertCapturedError fi From 9ca0c4eb8435a0ad18b1725dae2a77c2f860b7b9 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 24 Oct 2019 09:36:29 -0700 Subject: [PATCH 08/12] check for 3.5 on all stacks --- test/run-versions | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/test/run-versions b/test/run-versions index 023e418..bf4b8b8 100755 --- a/test/run-versions +++ b/test/run-versions @@ -61,23 +61,17 @@ testPython3_4_fail() { } testPython3_5() { - if [[ $STACK != "cedar-14" ]]; then - updateVersion "python3_5" $LATEST_35 - compile "python3_5" - assertCaptured $LATEST_35 - assertNotCaptured "security update" - assertCaptured "Installing SQLite3" - assertCapturedSuccess - fi + updateVersion "python3_5" $LATEST_35 + compile "python3_5" + assertCaptured $LATEST_35 + assertNotCaptured "security update" + assertCaptured "Installing SQLite3" + assertCapturedSuccess } testPython3_5_warn() { compile "python3_5_warn" - if [[ $STACK = "cedar-14" ]] ; then - assertCaptured "python-3.5.3" - assertCaptured "security update!" - assertCapturedError - elif [[ -n ${USE_STAGING_BINARIES} ]]; then + if [[ $STACK == "cedar-14" ]] || [[ -n ${USE_STAGING_BINARIES} ]]; then assertCaptured "python-3.5.3" assertCaptured "security update!" assertCapturedSuccess From f90dfbc12e80e352e448eb9dc1e724e3c7a2670c Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 24 Oct 2019 09:40:31 -0700 Subject: [PATCH 09/12] update 3.4 tests to fail on heroku 18 --- test/run-versions | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/test/run-versions b/test/run-versions index bf4b8b8..3459aa5 100755 --- a/test/run-versions +++ b/test/run-versions @@ -38,12 +38,14 @@ testPython2_fail() { } testPython3_4() { - if [[ $STACK != "cedar-14" ]]; then - updateVersion "python3_4" $LATEST_34 - compile "python3_4" - assertCaptured $LATEST_34 - assertNotCaptured "security update" + updateVersion "python3_4" $LATEST_34 + compile "python3_4" + assertCaptured $LATEST_34 + assertNotCaptured "security update" + if [[ $STACK == "cedar-14" ]] || [[ $STACK == "heroku-16" ]]; then assertCapturedSuccess + else + assertCapturedError fi } @@ -51,7 +53,11 @@ testPython3_4_warn() { compile "python3_4_warn" assertCaptured "python-3.4.9" assertCaptured "security update!" - assertCapturedSuccess + if [[ $STACK == "cedar-14" ]] || [[ $STACK == "heroku-16" ]]; then + assertCapturedSuccess + else + assertCapturedError + fi } testPython3_4_fail() { From f1b0f8c15482a9c157e36666472f8004732f8282 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 24 Oct 2019 12:48:04 -0700 Subject: [PATCH 10/12] correct the pass/fail metric for python 34 --- test/fixtures/python3_4/runtime.txt | 2 +- test/run-versions | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/test/fixtures/python3_4/runtime.txt b/test/fixtures/python3_4/runtime.txt index cc8325f..3b5c63e 100644 --- a/test/fixtures/python3_4/runtime.txt +++ b/test/fixtures/python3_4/runtime.txt @@ -1 +1 @@ -python-3.4.9 +python-3.4.10 diff --git a/test/run-versions b/test/run-versions index 3459aa5..6a5f67a 100755 --- a/test/run-versions +++ b/test/run-versions @@ -38,14 +38,18 @@ testPython2_fail() { } testPython3_4() { - updateVersion "python3_4" $LATEST_34 compile "python3_4" assertCaptured $LATEST_34 assertNotCaptured "security update" - if [[ $STACK == "cedar-14" ]] || [[ $STACK == "heroku-16" ]]; then - assertCapturedSuccess + # if cedar 14 and legacy binaries, fail. if cedar 14 and staging, succeed. + if [[ ! -n $USE_STAGING_BINARIES ]] && [[ $STACK == "cedar-14" ]]; then + assertCapturedError +# if heroku 18 and legacy binaries, succeed. if heroku 18 and staging, fail. + elif [[ -n $USE_STAGING_BINARIES ]] && [[ $STACK == "heroku-18" ]]; then + assertCapturedError else - assertCapturedError +# all else succeed + assertCapturedSuccess fi } @@ -53,10 +57,15 @@ testPython3_4_warn() { compile "python3_4_warn" assertCaptured "python-3.4.9" assertCaptured "security update!" - if [[ $STACK == "cedar-14" ]] || [[ $STACK == "heroku-16" ]]; then - assertCapturedSuccess + # if cedar 14 and legacy binaries, fail. if cedar 14 and staging, succeed. + if [[ ! -n $USE_STAGING_BINARIES ]] && [[ $STACK == "cedar-14" ]]; then + assertCapturedError +# if heroku 18 and legacy binaries, succeed. if heroku 18 and staging, fail. + elif [[ -n $USE_STAGING_BINARIES ]] && [[ $STACK == "heroku-18" ]]; then + assertCapturedError else - assertCapturedError +# all else succeed + assertCapturedSuccess fi } From a7f62496b1f574a919d92f02e7b32ea4e737c7be Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 28 Oct 2019 15:16:14 -0700 Subject: [PATCH 11/12] correct python35 tests --- test/fixtures/python3_5/runtime.txt | 2 +- test/fixtures/python3_5_warn/runtime.txt | 2 +- test/run-versions | 11 +++-------- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/test/fixtures/python3_5/runtime.txt b/test/fixtures/python3_5/runtime.txt index e6391f4..df4118a 100644 --- a/test/fixtures/python3_5/runtime.txt +++ b/test/fixtures/python3_5/runtime.txt @@ -1 +1 @@ -python-3.5.6 +python-3.5.7 diff --git a/test/fixtures/python3_5_warn/runtime.txt b/test/fixtures/python3_5_warn/runtime.txt index 5486d7a..e6391f4 100644 --- a/test/fixtures/python3_5_warn/runtime.txt +++ b/test/fixtures/python3_5_warn/runtime.txt @@ -1 +1 @@ -python-3.5.3 +python-3.5.6 diff --git a/test/run-versions b/test/run-versions index 6a5f67a..8ad9d1c 100755 --- a/test/run-versions +++ b/test/run-versions @@ -76,7 +76,6 @@ testPython3_4_fail() { } testPython3_5() { - updateVersion "python3_5" $LATEST_35 compile "python3_5" assertCaptured $LATEST_35 assertNotCaptured "security update" @@ -86,13 +85,9 @@ testPython3_5() { testPython3_5_warn() { compile "python3_5_warn" - if [[ $STACK == "cedar-14" ]] || [[ -n ${USE_STAGING_BINARIES} ]]; then - assertCaptured "python-3.5.3" - assertCaptured "security update!" - assertCapturedSuccess - else - assertCapturedError - fi + assertCaptured "python-3.5.6" + assertCaptured "security update!" + assertCapturedSuccess } testPython3_5_fail() { From 3c193bd4757606b9ec2280970fbe8e16d8ccd1bb Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 29 Oct 2019 07:42:50 -0700 Subject: [PATCH 12/12] update 3.4 warn test --- test/run-versions | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/run-versions b/test/run-versions index 8ad9d1c..0698b7c 100755 --- a/test/run-versions +++ b/test/run-versions @@ -57,11 +57,8 @@ testPython3_4_warn() { compile "python3_4_warn" assertCaptured "python-3.4.9" assertCaptured "security update!" - # if cedar 14 and legacy binaries, fail. if cedar 14 and staging, succeed. - if [[ ! -n $USE_STAGING_BINARIES ]] && [[ $STACK == "cedar-14" ]]; then - assertCapturedError # if heroku 18 and legacy binaries, succeed. if heroku 18 and staging, fail. - elif [[ -n $USE_STAGING_BINARIES ]] && [[ $STACK == "heroku-18" ]]; then + if [[ -n $USE_STAGING_BINARIES ]] && [[ $STACK == "heroku-18" ]]; then assertCapturedError else # all else succeed