Update travis with optional logs if build or install fail.
This commit is contained in:
parent
665dc4852c
commit
817d53e08e
17
.travis.yml
17
.travis.yml
@ -48,19 +48,18 @@ before_script:
|
||||
- sudo mv daemon.json /etc/docker/daemon.json
|
||||
- sudo systemctl restart docker
|
||||
- docker version
|
||||
- sh -c 'while true; do echo "."; sleep 60; done' &
|
||||
- TRAVIS_POLL=$!
|
||||
- docker build --platform=local -o . git://github.com/docker/buildx > /dev/null 2>&1
|
||||
- kill -9 ${TRAVIS_POLL}
|
||||
- sh -c 'while true; do echo "."; sleep 60; done' &; export TRAVIS_POLL_INSTALL=$!
|
||||
- docker build --platform=local -o . git://github.com/docker/buildx > logs 2>&1; export INSTALL_RESULT=$?
|
||||
- kill -9 ${TRAVIS_POLL_INSTALL}
|
||||
- if [ ! "$INSTALL_RESULT" = "0" ]; then tail -n 500 logs; fi
|
||||
- mkdir -p ~/.docker/cli-plugins/
|
||||
- mv buildx ~/.docker/cli-plugins/docker-buildx
|
||||
|
||||
# Run the build and packaging and upload the built images to DockerHub
|
||||
script:
|
||||
- docker buildx create --use --name insecure-builder --buildkitd-flags '--allow-insecure-entitlement security.insecure'
|
||||
- sh -c 'while true; do echo "."; sleep 60; done' &
|
||||
- TRAVIS_POLL=$!
|
||||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||
- docker buildx build -t metacall/guix -o type=registry --allow security.insecure --build-arg METACALL_GUIX_VERSION="1.0.1" --build-arg METACALL_GUIX_ARCH="x86_64" . > logs 2>&1
|
||||
- if [ ! "$?" = "0" ]; then tail -n 500 logs; fi
|
||||
- kill -9 ${TRAVIS_POLL}
|
||||
- sh -c 'while true; do echo "."; sleep 60; done' &; export TRAVIS_POLL_BUILD=$!
|
||||
- docker buildx build -t metacall/guix -o type=registry --allow security.insecure --build-arg METACALL_GUIX_VERSION="1.0.1" --build-arg METACALL_GUIX_ARCH="x86_64" . > logs 2>&1; export BUILD_RESULT=$?
|
||||
- kill -9 ${TRAVIS_POLL_BUILD}
|
||||
- if [ ! "$BUILD_RESULT" = "0" ]; then tail -n 500 logs; fi
|
||||
|
Loading…
Reference in New Issue
Block a user