Skip to content
This repository was archived by the owner on Jul 12, 2022. It is now read-only.

Commit 1e62027

Browse files
authored
Fix docker deployment (#27)
1 parent 517ac2a commit 1e62027

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

.travis.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cache: cargo
99
env:
1010
global:
1111
- RUST_BACKTRACE=1
12+
- IMAGE_NAME="chainsafe/chainbridge-substrate-chain"
1213

1314
before_install:
1415
- df -h
@@ -18,14 +19,14 @@ jobs:
1819
- stage: "Build"
1920
name: Build (WASM and native)
2021
script:
21-
- RUST_TOOLCHAIN=nightly-2020-08-16 TARGET=build-client travis_wait 180 ./scripts/ci.sh
22+
- travis_wait 180 docker build -t $IMAGE_NAME:latest .
2223
deploy:
2324
- provider: script
24-
script: TARGET=default travis_wait 180 ./scripts/ci_docker.sh
25+
script: TARGET=default ./scripts/ci_docker.sh
2526
on:
2627
branch: master
2728
- provider: script
28-
script: TAG=$TRAVIS_TAG TARGET=release travis_wait 180 ./scripts/ci_docker.sh
29+
script: TAG=$TRAVIS_TAG TARGET=release ./scripts/ci_docker.sh
2930
on:
3031
tags: true
3132

scripts/ci_docker.sh

+3-6
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,15 @@ TAG=${TAG:-"${TIMESTAMP}-${GIT_SHORT_COMMIT}"}
88

99
case $TARGET in
1010
"default")
11-
echo "Pushing image with tags \"latest\" and \"$TAG\""
12-
docker build $BUILD_ARGS -t ${IMAGE_NAME}:${TAG} .
13-
docker tag "${IMAGE_NAME}:${TAG}" "${IMAGE_NAME}:latest"
11+
echo "Pushing image with tag $TAG"
12+
docker tag ${IMAGE_NAME}:latest ${IMAGE_NAME}:${TAG}
1413
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
15-
docker push ${IMAGE_NAME}:latest
1614
docker push ${IMAGE_NAME}:${TAG}
1715
;;
1816

1917
"release")
2018
echo "Pushing image with tag $TAG"
21-
docker build $BUILD_ARGS -t ${IMAGE_NAME}:${TAG} .
22-
docker tag "${IMAGE_NAME}:${TAG}"
19+
docker tag ${IMAGE_NAME}:latest ${IMAGE_NAME}:${TAG}
2320
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
2421
docker push ${IMAGE_NAME}:${TAG}
2522
;;

0 commit comments

Comments
 (0)