solidity/scripts/docker_deploy.sh
Justin Wilson 16d1bf3335 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
2018-11-27 13:45:59 -07:00

30 lines
777 B
Bash
Executable File

#!/usr/bin/env sh
set -e
image="ethereum/solc"
tag_and_push()
{
docker tag "$image:$1" "$image:$2"
docker push "$image:$2"
}
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
version=$($(dirname "$0")/get_version.sh)
if [ "$TRAVIS_BRANCH" = "develop" ]
then
tag_and_push build nightly
tag_and_push build nightly-"$version"-"$TRAVIS_COMMIT"
tag_and_push build-alpine nightly-alpine
tag_and_push build-alpine nightly-alpine-"$version"-"$TRAVIS_COMMIT"
elif [ "$TRAVIS_TAG" = v"$version" ]
then
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 $TRAVIS_BRANCH or tag $TRAVIS_TAG"
fi