mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Add support for testing binaries in staging/ on S3
This will allow for faster and more transparent deploys for Python and other built dependencies.
This commit is contained in:
+2
-1
@@ -8,4 +8,5 @@ repos/*
|
||||
#Venv
|
||||
buildpack/*
|
||||
|
||||
builds/dockerenv
|
||||
builds/dockerenv.staging*
|
||||
builds/dockerenv.production
|
||||
|
||||
@@ -8,6 +8,14 @@ check:
|
||||
@shellcheck -x bin/steps/collectstatic bin/steps/eggpath-fix bin/steps/eggpath-fix2 bin/steps/gdal bin/steps/geo-libs bin/steps/mercurial bin/steps/nltk bin/steps/pip-install bin/steps/pip-uninstall bin/steps/pipenv bin/steps/pipenv-python-version bin/steps/pylibmc bin/steps/python
|
||||
@shellcheck -x bin/steps/hooks/*
|
||||
|
||||
test-staging:
|
||||
@echo "Running tests against staged binaries..."
|
||||
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-16" -e "TEST_STAGED_S3_BINARIES=1" heroku/heroku:16-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
|
||||
@echo ""
|
||||
@echo "Running tests in docker (heroku-18)..."
|
||||
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-18" -e "TEST_STAGED_S3_BINARIES=1" heroku/heroku:18-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
|
||||
@echo ""
|
||||
|
||||
test-heroku-16:
|
||||
@echo "Running tests in docker (heroku-16)..."
|
||||
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-16" heroku/heroku:16-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
|
||||
|
||||
@@ -43,6 +43,13 @@ VENDOR_URL="https://lang-python.s3.amazonaws.com/$STACK"
|
||||
if [[ -n ${BUILDPACK_VENDOR_URL:-} ]]; then
|
||||
VENDOR_URL="$BUILDPACK_VENDOR_URL"
|
||||
fi
|
||||
|
||||
# Build binaries (python runtimes, etc) in the /staging/ directory on S3. Test
|
||||
these binaries for compatibility when passed this environment variable.
|
||||
if [ "$TEST_STAGED_S3_BINARIES" == "1" ]; then
|
||||
echo "Testing staged binaries..."
|
||||
VENDOR_URL="https://lang-python.s3.amazonaws.com/staging/$STACK"
|
||||
fi
|
||||
export VENDOR_URL
|
||||
|
||||
# Default Python Versions
|
||||
|
||||
Reference in New Issue
Block a user