diff options
author | Max Magorsch <max@magorsch.de> | 2019-12-31 22:53:26 +0100 |
---|---|---|
committer | Max Magorsch <max@magorsch.de> | 2019-12-31 22:53:26 +0100 |
commit | 3ce8885c1638713caf8f2e7fd46b397930adaebc (patch) | |
tree | fa9c30c27a90db9a62e6eacb5a1e885061f2bedf | |
parent | Disable travis until we can store container images (diff) | |
download | packages-5-3ce8885c1638713caf8f2e7fd46b397930adaebc.tar.gz packages-5-3ce8885c1638713caf8f2e7fd46b397930adaebc.tar.bz2 packages-5-3ce8885c1638713caf8f2e7fd46b397930adaebc.zip |
Enable travis to build the container images
Travis is used to build the docker images. All images are cached to
reduce the build times.
A stage to publish the container to either dockerhub or github packages
has been added but not enabled yet.
Signed-off-by: Max Magorsch <max@magorsch.de>
-rw-r--r-- | .travis/travis.docker.yml | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/.travis/travis.docker.yml b/.travis/travis.docker.yml index 2a32e94..f9f33b7 100644 --- a/.travis/travis.docker.yml +++ b/.travis/travis.docker.yml @@ -3,12 +3,24 @@ language: generic services: - docker -# Disable the docker based build until we have a place to store the container images. -# Otherwise the build takes really much time. +cache: + directories: + - docker_images -#before_install: -# - travis_wait 60 docker build -q . -# - docker-compose build > /dev/null +before_install: + - docker load -i docker_images/images.tar || true + - travis_wait 120 docker build -t pgo . #script: -# - docker-compose -f docker-compose.test.yml up --exit-code-from http-serving
\ No newline at end of file +# # publish on dockerhub +# - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin +# # publish on github packages +# - docker login -u USERNAME -p TOKEN docker.pkg.github.com +# - docker tag pgo gentoo/gpackages:latest +# - docker push gentoo/gpackages:latest +# - echo "Published docker image" +# # Run tests +# #- docker-compose -f docker-compose.test.yml up --exit-code-from http-serving + +before_cache: + - docker save -o docker_images/images.tar $(docker images -a -q)
\ No newline at end of file |