diff --git a/.travis.yml b/.travis.yml index 0c53971..0995a6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ cache: cargo env: global: - RUST_BACKTRACE=1 + - IMAGE_NAME="chainsafe/chainbridge-substrate-chain" before_install: - df -h @@ -18,14 +19,14 @@ jobs: - stage: "Build" name: Build (WASM and native) script: - - RUST_TOOLCHAIN=nightly-2020-08-16 TARGET=build-client travis_wait 180 ./scripts/ci.sh + - travis_wait 180 docker build -t $IMAGE_NAME:latest . deploy: - provider: script - script: TARGET=default travis_wait 180 ./scripts/ci_docker.sh + script: TARGET=default ./scripts/ci_docker.sh on: branch: master - provider: script - script: TAG=$TRAVIS_TAG TARGET=release travis_wait 180 ./scripts/ci_docker.sh + script: TAG=$TRAVIS_TAG TARGET=release ./scripts/ci_docker.sh on: tags: true diff --git a/scripts/ci_docker.sh b/scripts/ci_docker.sh index 162ccf0..3fba630 100755 --- a/scripts/ci_docker.sh +++ b/scripts/ci_docker.sh @@ -8,18 +8,15 @@ TAG=${TAG:-"${TIMESTAMP}-${GIT_SHORT_COMMIT}"} case $TARGET in "default") - echo "Pushing image with tags \"latest\" and \"$TAG\"" - docker build $BUILD_ARGS -t ${IMAGE_NAME}:${TAG} . - docker tag "${IMAGE_NAME}:${TAG}" "${IMAGE_NAME}:latest" + echo "Pushing image with tag $TAG" + docker tag ${IMAGE_NAME}:latest ${IMAGE_NAME}:${TAG} echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker push ${IMAGE_NAME}:latest docker push ${IMAGE_NAME}:${TAG} ;; "release") echo "Pushing image with tag $TAG" - docker build $BUILD_ARGS -t ${IMAGE_NAME}:${TAG} . - docker tag "${IMAGE_NAME}:${TAG}" + docker tag ${IMAGE_NAME}:latest ${IMAGE_NAME}:${TAG} echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker push ${IMAGE_NAME}:${TAG} ;;