WIP Push Docker image and build from it in sub-stages #2013
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



This is a follow-up for #2011 it also supersedes it as it's built on top. See description below:
The
docker buildis now running alongside thetoxtesting as part ofthe
pre checksstage. It also fully leverages the docker image cache.The newly built image is pushed to be available for subsequent build
stages and pull requests.
Two environment variables
DOCKER_USERNAMEandDOCKER_PASSWORDgotadded to the Travis UI for making image pushing possible. Both
pushand
pullfeatures fail silently with|| trueas they should beoptional for a valid build.
TRAVIS_PULL_REQUESTandTRAVIS_BRANCHare built-in Travis variables.Note that we're passing variables to
Makefileexplicitly onmakecall rather than using the
--environment-overridesflag. While it'smore verbose, it makes it easier to follow what's being used and when.
With this change,
Python 3 arm64-v8athe longesttestappsbuild thatwas taking ~26 minutes to complete is now taking ~20 minutes when
hitting docker layers cache (most of the time). The shorter build
Rebuild updated recipeswas taking ~9 minutes and is now down to ~3minutes.
Closes #2009