mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
create automated docker deployment
Signed-off-by: RJ Catalano <rj@monax.io>
This commit is contained in:
parent
00feec567a
commit
d76d9d4169
@ -1,12 +1,16 @@
|
||||
FROM alpine
|
||||
MAINTAINER chriseth <chris@ethereum.org>
|
||||
#Official solidity docker image
|
||||
|
||||
RUN \
|
||||
apk --no-cache --update add build-base cmake boost-dev git && \
|
||||
sed -i -E -e 's/include <sys\/poll.h>/include <poll.h>/' /usr/include/boost/asio/detail/socket_types.hpp && \
|
||||
git clone --depth 1 --recursive -b develop https://github.com/ethereum/solidity && \
|
||||
cd /solidity && cmake -DCMAKE_BUILD_TYPE=Release -DTESTS=0 -DSTATIC_LINKING=1 && \
|
||||
cd /solidity && make solc && install -s solc/solc /usr/bin && \
|
||||
#Establish working directory as solidity
|
||||
WORKDIR /solidity
|
||||
#Copy working directory on travis to the image
|
||||
COPY / $WORKDIR
|
||||
|
||||
#Install dependencies, eliminate annoying warnings, and build release, delete all remaining points and statically link.
|
||||
RUN ./scripts/install_deps.sh && sed -i -E -e 's/include <sys\/poll.h>/include <poll.h>/' /usr/include/boost/asio/detail/socket_types.hpp &&\
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DTESTS=0 -DSTATIC_LINKING=1 &&\
|
||||
make solc && install -s solc/solc /usr/bin &&\
|
||||
cd / && rm -rf solidity &&\
|
||||
apk del sed build-base git make cmake gcc g++ musl-dev curl-dev boost-dev &&\
|
||||
rm -rf /var/cache/apk/*
|
17
scripts/docker_deploy.sh
Executable file
17
scripts/docker_deploy.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
|
||||
version=version=$(grep -oP "PROJECT_VERSION \"?\K[0-9.]+(?=\")"? $(dirname "$0")/CMakeLists.txt)
|
||||
if [ "$TRAVIS_BRANCH" == "develop" ]; then
|
||||
docker tag ethereum/solc:build ethereum/solc:nightly;
|
||||
docker tag ethereum/solc:build ethereum/solc:nightly-"$version"-"$TRAVIS_COMMIT"
|
||||
docker push ethereum/solc:nightly-"$version"-"$TRAVIS_COMMIT";
|
||||
docker push ethereum/solc:nightly;
|
||||
elif [ "$TRAVIS_BRANCH" == "release"]; then
|
||||
docker tag ethereum/solc:build ethereum/solc:stable;
|
||||
docker tag ethereum/solc:build ethereum/solc:"$version";
|
||||
docker tag ethereum/solc:build ethereum/solc:
|
||||
docker push ethereum/solc;
|
||||
docker push ethereum/solc:"$version";
|
||||
docker push ethereum/solc:stable;
|
||||
fi
|
Loading…
Reference in New Issue
Block a user