diff options
author | Justin Wilson <justin@minty.io> | 2018-11-28 04:45:59 +0800 |
---|---|---|
committer | Justin Wilson <justin@minty.io> | 2018-11-28 04:45:59 +0800 |
commit | 16d1bf33357a48167298f1961124a50cd54172e1 (patch) | |
tree | 61e6737c77e290f268d0abcb1fb5286576da8297 /scripts/docker_deploy_manual.sh | |
parent | bc7cb301e3d71756c8fbefe888aca53433302117 (diff) | |
download | dexon-solidity-16d1bf33357a48167298f1961124a50cd54172e1.tar.gz dexon-solidity-16d1bf33357a48167298f1961124a50cd54172e1.tar.zst dexon-solidity-16d1bf33357a48167298f1961124a50cd54172e1.zip |
Builds both scratch & Alpine Docker images
- Adds `Dockerfile_alpine`, which copies the complier from the scratch
step into an Alpine image
- Updates `docker_build.sh` to build the Alpine image
- Updates `docker_deploy.sh` to tag and push the Alpine images
- Updates `docker_deploy_manual.sh` to tag and push the Alpine images
The tags that are pushed follow:
- Scratch
- ethereum/solc:stable
- ethereum/solc:0.5.1
- ethereum/solc:nightly
- ethereum/solc:nightly-0.5.1-bc7cb301e3d71756c8fbefe888aca53433302117
- ethereum/solc:nightly-0.5.1-bc7cb301e3d71756c8fbefe888aca53433302117
- Alpine
- ethereum/solc:stable-alpine
- ethereum/solc:0.5.1-alpine
- ethereum/solc:nightly-alpine
- ethereum/solc:nightly-alpine-0.5.1-bc7cb301e3d71756c8fbefe888aca53433302117
- ethereum/solc:nightly-alpine-0.5.1-bc7cb301e3d71756c8fbefe888aca53433302117
Diffstat (limited to 'scripts/docker_deploy_manual.sh')
-rwxr-xr-x | scripts/docker_deploy_manual.sh | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/scripts/docker_deploy_manual.sh b/scripts/docker_deploy_manual.sh index c098f4ee..0393d22d 100755 --- a/scripts/docker_deploy_manual.sh +++ b/scripts/docker_deploy_manual.sh @@ -7,6 +7,7 @@ then echo "Usage: $0 <tag/branch>" exit 1 fi +image="ethereum/solc" branch="$1" #docker login @@ -27,21 +28,27 @@ else date -u +"nightly.%Y.%-m.%-d" > prerelease.txt fi +tag_and_push() +{ + docker tag "$image:$1" "$image:$2" + docker push "$image:$2" +} + rm -rf .git -docker build -t ethereum/solc:build -f scripts/Dockerfile . -tmp_container=$(docker create ethereum/solc:build sh) +docker build -t "$image":build -f scripts/Dockerfile . +tmp_container=$(docker create "$image":build sh) if [ "$branch" = "develop" ] then - docker tag ethereum/solc:build ethereum/solc:nightly; - docker tag ethereum/solc:build ethereum/solc:nightly-"$version"-"$commithash" - docker push ethereum/solc:nightly-"$version"-"$commithash"; - docker push ethereum/solc:nightly; + tag_and_push build nightly + tag_and_push build nightly-"$version"-"$commithash" + tag_and_push build-alpine nightly-alpine + tag_and_push build-alpine nightly-alpine-"$version"-"$commithash" elif [ "$branch" = v"$version" ] then - docker tag ethereum/solc:build ethereum/solc:stable; - docker tag ethereum/solc:build ethereum/solc:"$version"; - docker push ethereum/solc:stable; - docker push ethereum/solc:"$version"; + tag_and_push build stable + tag_and_push build "$version" + tag_and_push build-alpine stable-alpine + tag_and_push build-alpine "$version"-alpine else echo "Not publishing docker image from branch or tag $branch" fi |