chore: use new base image

This commit is contained in:
Blair Vanderlugt 2021-12-07 17:46:25 -08:00
parent 2565c393bf
commit e4f419aefa
2 changed files with 20 additions and 16 deletions

View File

@ -3,7 +3,7 @@ stages:
- slither-analyzer - slither-analyzer
test: test:
image: registry.gitlab.com/grassrootseconomics/cic-base-images/ci-solc-py-alpine:latest image: registry.gitlab.com/grassrootseconomics/cic-base-images/ci-solc-py:latest
cache: cache:
- key: - key:
files: files:
@ -11,16 +11,18 @@ test:
- test_requirements.txt - test_requirements.txt
paths: paths:
- /root/.cache/pip - /root/.cache/pip
allow_failure: true
script: script:
- cd python - cd python
- pip install --extra-index-url https://pip.grassrootseconomics.net:8433 -r test_requirements.txt - export PYTHONPATH=.
- pip install --extra-index-url https://pip.grassrootseconomics.net:8433 -r test_requirements.txt - pip install --extra-index-url https://pip.grassrootseconomics.net:8433
--extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple
-r requirements.txt -r test_requirements.txt
- bash run_tests.sh - bash run_tests.sh
slither-analize: slither-analize:
image: registry.gitlab.com/grassrootseconomics/cic-base-images/ci-solc-py-alpine:latest image: registry.gitlab.com/grassrootseconomics/cic-base-images/ci-solc-py:latest
script: script:
- pip install slither-analyzer - pip install slither-analyzer
- slither solidity/ - slither solidity/

View File

@ -1,33 +1,35 @@
FROM ethereum/solc:0.6.12 FROM ethereum/solc:0.6.12
FROM python:3.8.6-alpine FROM python:3.8.6
COPY --from=0 /usr/bin/solc /usr/bin/solc COPY --from=0 /usr/bin/solc /usr/bin/solc
RUN apk update &&\ #RUN apk update &&\
apk add gcc bash musl-dev libffi-dev openssl-dev autoconf automake build-base \ # apk add gcc bash cargo
libtool pkgconfig python3-dev cargo RUN apt update && \
apt install -y gcc bash cargo
WORKDIR /usr/src WORKDIR /usr/src
# Try to keep everything above here re-usable! # Try to keep everything above here re-usable!
COPY ./solidity/ /usr/src/giftable_erc20_token/solidity/ COPY . .
COPY ./python/ /usr/src/giftable_erc20_token/python/
RUN chmod +x ./python/run_tests.sh RUN chmod +x ./python/run_tests.sh
RUN cd giftable_erc20_token/solidity && \ RUN cd ./solidity && \
solc GiftableToken.sol --abi | awk 'NR>3' > GiftableToken.abi.json solc GiftableToken.sol --abi | awk 'NR>3' > GiftableToken.abi.json
RUN cd giftable_erc20_token/solidity && \ RUN cd ./solidity && \
solc GiftableToken.sol --bin | awk 'NR>3' > GiftableToken.bin && \ solc GiftableToken.sol --bin | awk 'NR>3' > GiftableToken.bin && \
truncate -s "$((`stat -t -c "%s" GiftableToken.bin`-1))" GiftableToken.bin truncate -s "$((`stat -t -c "%s" GiftableToken.bin`-1))" GiftableToken.bin
RUN cd giftable_erc20_token/python && \ RUN cd ./python && \
pip install --extra-index-url https://pip.grassrootseconomics.net:8433 . pip install --extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple \
--extra-index-url https://pip.grassrootseconomics.net:8433 \
-r requirements.txt -r test_requirements.txt
RUN pip install slither-analyzer #RUN pip install slither-analyzer
# To deploy: # To deploy:
# giftable-token-deploy --contracts-dir giftable_erc20_token/solidity/ <amount> # giftable-token-deploy --contracts-dir giftable_erc20_token/solidity/ <amount>