Update travis

This commit is contained in:
CrazyMax 2018-09-27 21:27:05 +02:00
parent 91cb09fbf8
commit 0821935fea
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

View File

@ -29,10 +29,10 @@ install:
docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=${TRAVIS_COMMIT::8} \ --build-arg VCS_REF=${TRAVIS_COMMIT::8} \
--build-arg VERSION=${VERSION} \ --build-arg VERSION=${VERSION} \
-t $DOCKER_USERNAME/$DOCKER_REPONAME . -t docker_build .
before_script: before_script:
- docker run -d -p 8000:80 -e JLS_VIRTUAL_HOSTS=$WAN_IP --name $DOCKER_REPONAME $DOCKER_USERNAME/$DOCKER_REPONAME - docker run -d -p 8000:80 -e JLS_VIRTUAL_HOSTS=$WAN_IP --name $DOCKER_REPONAME docker_build
- sleep 20 - sleep 20
- docker logs $DOCKER_REPONAME - docker logs $DOCKER_REPONAME
@ -43,12 +43,12 @@ after_success:
- | - |
test $TRAVIS_PULL_REQUEST = false \ test $TRAVIS_PULL_REQUEST = false \
&& echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin \ && echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin \
&& docker tag $DOCKER_USERNAME/$DOCKER_REPONAME $DOCKER_USERNAME/$DOCKER_REPONAME:$DOCKER_TAG \ && docker tag docker_build $DOCKER_USERNAME/$DOCKER_REPONAME:$DOCKER_TAG \
&& docker tag $DOCKER_USERNAME/$DOCKER_REPONAME $DOCKER_USERNAME/$DOCKER_REPONAME:$VERSION \ && docker tag docker_build $DOCKER_USERNAME/$DOCKER_REPONAME:$VERSION \
&& docker push $DOCKER_USERNAME/$DOCKER_REPONAME \ && docker push $DOCKER_USERNAME/$DOCKER_REPONAME \
&& echo "$QUAY_PASSWORD" | docker login quay.io --username "$QUAY_USERNAME" --password-stdin \ && echo "$QUAY_PASSWORD" | docker login quay.io --username "$QUAY_USERNAME" --password-stdin \
&& docker tag $DOCKER_USERNAME/$DOCKER_REPONAME quay.io/$DOCKER_USERNAME/$DOCKER_REPONAME:$DOCKER_TAG \ && docker tag docker_build quay.io/$DOCKER_USERNAME/$DOCKER_REPONAME:$DOCKER_TAG \
&& docker tag $DOCKER_USERNAME/$DOCKER_REPONAME quay.io/$DOCKER_USERNAME/$DOCKER_REPONAME:$VERSION \ && docker tag docker_build quay.io/$DOCKER_USERNAME/$DOCKER_REPONAME:$VERSION \
&& docker push quay.io/$QUAY_USERNAME/$QUAY_REPONAME \ && docker push quay.io/$QUAY_USERNAME/$QUAY_REPONAME \
&& curl -X POST $MICROBADGER_HOOK && curl -X POST $MICROBADGER_HOOK