Skip to content

Commit

Permalink
add lotus-test image as CI build step
Browse files Browse the repository at this point in the history
  • Loading branch information
nonsense committed Jan 14, 2022
1 parent da6752e commit eaf3eab
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .circleci/config.yml
Expand Up @@ -618,6 +618,11 @@ jobs:
default: "latest"
description: A comma-separated string containing docker image tags to build and push (default = latest)

target:
type: string
default: "lotus-all-in-one"
description: Docker target to build

steps:
- run:
name: Confirm that environment variables are set
Expand Down Expand Up @@ -657,6 +662,7 @@ jobs:
docker build \
<<#parameters.extra-build-args>><<parameters.extra-build-args>><</parameters.extra-build-args>> \
--target <<parameters.target>> \
-f <<parameters.path>>/<<parameters.dockerfile>> \
$docker_tag_args \
<<parameters.path>>
Expand Down Expand Up @@ -996,7 +1002,14 @@ workflows:
dockerfile: Dockerfile.lotus
path: .
repo: lotus-dev
target: lotus-all-in-one
tag: '${CIRCLE_SHA1:0:8}'
- build-and-push-image:
dockerfile: Dockerfile.lotus
path: .
repo: lotus-test
tag: '${CIRCLE_SHA1:0:8}'
target: test
- publish-packer-mainnet:
requires:
- build-all
Expand Down
45 changes: 45 additions & 0 deletions Dockerfile.lotus
Expand Up @@ -28,6 +28,14 @@ WORKDIR /opt/filecoin
RUN make clean deps


FROM builder-local AS builder-test
MAINTAINER Lotus Development Team

WORKDIR /opt/filecoin

RUN make debug


FROM builder-local AS builder
MAINTAINER Lotus Development Team

Expand Down Expand Up @@ -197,6 +205,43 @@ RUN chown fc: /var/lib/lotus-worker
RUN chown fc: /var/lib/lotus-wallet


VOLUME /var/tmp/filecoin-proof-parameters
VOLUME /var/lib/lotus
VOLUME /var/lib/lotus-miner
VOLUME /var/lib/lotus-worker
VOLUME /var/lib/lotus-wallet

EXPOSE 1234
EXPOSE 2345
EXPOSE 3456
EXPOSE 1777

###
from base as lotus-test

ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
ENV LOTUS_MINER_PATH /var/lib/lotus-miner
ENV LOTUS_PATH /var/lib/lotus
ENV LOTUS_WORKER_PATH /var/lib/lotus-worker
ENV WALLET_PATH /var/lib/lotus-wallet

COPY --from=builder-test /opt/filecoin/lotus /usr/local/bin/
COPY --from=builder-test /opt/filecoin/lotus-miner /usr/local/bin/
COPY --from=builder-test /opt/filecoin/lotus-worker /usr/local/bin/
COPY --from=builder-test /opt/filecoin/lotus-seed /usr/local/bin/

RUN mkdir /var/tmp/filecoin-proof-parameters
RUN mkdir /var/lib/lotus
RUN mkdir /var/lib/lotus-miner
RUN mkdir /var/lib/lotus-worker
RUN mkdir /var/lib/lotus-wallet
RUN chown fc: /var/tmp/filecoin-proof-parameters
RUN chown fc: /var/lib/lotus
RUN chown fc: /var/lib/lotus-miner
RUN chown fc: /var/lib/lotus-worker
RUN chown fc: /var/lib/lotus-wallet


VOLUME /var/tmp/filecoin-proof-parameters
VOLUME /var/lib/lotus
VOLUME /var/lib/lotus-miner
Expand Down

0 comments on commit eaf3eab

Please sign in to comment.