Merge pull request #7956 from filecoin-project/nonsense/add-lotus-test-image-building
feat: infra/ci: add `lotus-test` image as CI build step
This commit is contained in:
commit
efdcd00da4
@ -628,6 +628,11 @@ jobs:
|
|||||||
default: "latest"
|
default: "latest"
|
||||||
description: A comma-separated string containing docker image tags to build and push (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:
|
steps:
|
||||||
- run:
|
- run:
|
||||||
name: Confirm that environment variables are set
|
name: Confirm that environment variables are set
|
||||||
@ -667,6 +672,7 @@ jobs:
|
|||||||
|
|
||||||
docker build \
|
docker build \
|
||||||
<<#parameters.extra-build-args>><<parameters.extra-build-args>><</parameters.extra-build-args>> \
|
<<#parameters.extra-build-args>><<parameters.extra-build-args>><</parameters.extra-build-args>> \
|
||||||
|
--target <<parameters.target>> \
|
||||||
-f <<parameters.path>>/<<parameters.dockerfile>> \
|
-f <<parameters.path>>/<<parameters.dockerfile>> \
|
||||||
$docker_tag_args \
|
$docker_tag_args \
|
||||||
<<parameters.path>>
|
<<parameters.path>>
|
||||||
@ -1037,6 +1043,13 @@ workflows:
|
|||||||
path: .
|
path: .
|
||||||
repo: lotus-dev
|
repo: lotus-dev
|
||||||
tag: '${CIRCLE_SHA1:0:8}'
|
tag: '${CIRCLE_SHA1:0:8}'
|
||||||
|
target: lotus-all-in-one
|
||||||
|
- build-and-push-image:
|
||||||
|
dockerfile: Dockerfile.lotus
|
||||||
|
path: .
|
||||||
|
repo: lotus-test
|
||||||
|
tag: '${CIRCLE_SHA1:0:8}'
|
||||||
|
target: lotus-test
|
||||||
- publish-packer-mainnet:
|
- publish-packer-mainnet:
|
||||||
requires:
|
requires:
|
||||||
- build-all
|
- build-all
|
||||||
|
@ -628,6 +628,11 @@ jobs:
|
|||||||
default: "latest"
|
default: "latest"
|
||||||
description: A comma-separated string containing docker image tags to build and push (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:
|
steps:
|
||||||
- run:
|
- run:
|
||||||
name: Confirm that environment variables are set
|
name: Confirm that environment variables are set
|
||||||
@ -667,6 +672,7 @@ jobs:
|
|||||||
|
|
||||||
docker build \
|
docker build \
|
||||||
<<#parameters.extra-build-args>><<parameters.extra-build-args>><</parameters.extra-build-args>> \
|
<<#parameters.extra-build-args>><<parameters.extra-build-args>><</parameters.extra-build-args>> \
|
||||||
|
--target <<parameters.target>> \
|
||||||
-f <<parameters.path>>/<<parameters.dockerfile>> \
|
-f <<parameters.path>>/<<parameters.dockerfile>> \
|
||||||
$docker_tag_args \
|
$docker_tag_args \
|
||||||
<<parameters.path>>
|
<<parameters.path>>
|
||||||
@ -862,6 +868,13 @@ workflows:
|
|||||||
path: .
|
path: .
|
||||||
repo: lotus-dev
|
repo: lotus-dev
|
||||||
tag: '${CIRCLE_SHA1:0:8}'
|
tag: '${CIRCLE_SHA1:0:8}'
|
||||||
|
target: lotus-all-in-one
|
||||||
|
- build-and-push-image:
|
||||||
|
dockerfile: Dockerfile.lotus
|
||||||
|
path: .
|
||||||
|
repo: lotus-test
|
||||||
|
tag: '${CIRCLE_SHA1:0:8}'
|
||||||
|
target: lotus-test
|
||||||
- publish-packer-mainnet:
|
- publish-packer-mainnet:
|
||||||
requires:
|
requires:
|
||||||
- build-all
|
- build-all
|
||||||
|
@ -28,6 +28,14 @@ WORKDIR /opt/filecoin
|
|||||||
RUN make clean deps
|
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
|
FROM builder-local AS builder
|
||||||
MAINTAINER Lotus Development Team
|
MAINTAINER Lotus Development Team
|
||||||
|
|
||||||
@ -198,6 +206,43 @@ RUN chown fc: /var/lib/lotus-worker
|
|||||||
RUN chown fc: /var/lib/lotus-wallet
|
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/tmp/filecoin-proof-parameters
|
||||||
VOLUME /var/lib/lotus
|
VOLUME /var/lib/lotus
|
||||||
VOLUME /var/lib/lotus-miner
|
VOLUME /var/lib/lotus-miner
|
||||||
|
Loading…
Reference in New Issue
Block a user