mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-05-13 09:08:02 +08:00
Merge pull request #1766 from blockstack/feat/docker-stretch
Add `:stretch` image to the circle docker builds
This commit is contained in:
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
@@ -23,7 +23,9 @@ jobs:
|
||||
run: build-scripts/build-dist.sh
|
||||
|
||||
- name: Upload artifact
|
||||
# Only upload the artifacts if we're actually pushed to master
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.platform }}
|
||||
path: dist/
|
||||
path: dist/
|
||||
|
||||
20
Dockerfile.stretch
Normal file
20
Dockerfile.stretch
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM rust:stretch as build
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN mkdir /out
|
||||
|
||||
RUN cd testnet/stacks-node && cargo build --features "monitoring_prom" --release
|
||||
RUN cd testnet/bitcoin-neon-controller && cargo build --release
|
||||
|
||||
RUN cp target/release/stacks-node /out
|
||||
RUN cp target/release/bitcoin-neon-controller /out
|
||||
|
||||
FROM debian:stretch-slim
|
||||
|
||||
RUN apt update && apt install -y netcat
|
||||
COPY --from=build /out/ /bin/
|
||||
|
||||
CMD ["stacks-node", "argon"]
|
||||
34
circle.yml
34
circle.yml
@@ -77,6 +77,22 @@ jobs:
|
||||
root: .
|
||||
paths:
|
||||
- ./image.tar
|
||||
build-docker-stretch:
|
||||
executor: docker-publisher
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
- run:
|
||||
name: build docker image
|
||||
no_output_timeout: 30m
|
||||
command: docker build . -f Dockerfile.stretch -t $IMAGE_NAME:stretch
|
||||
- run:
|
||||
name: save image to workspace
|
||||
command: docker save -o image-stretch.tar $IMAGE_NAME:stretch
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- ./image-stretch.tar
|
||||
push-docker-tags:
|
||||
executor: docker-publisher
|
||||
steps:
|
||||
@@ -86,6 +102,9 @@ jobs:
|
||||
- run:
|
||||
name: load docker image
|
||||
command: docker load -i /tmp/workspace/image.tar
|
||||
- run:
|
||||
name: load docker image
|
||||
command: docker load -i /tmp/workspace/image-stretch.tar
|
||||
- run:
|
||||
name: push docker image
|
||||
command: |
|
||||
@@ -94,9 +113,9 @@ jobs:
|
||||
docker tag $IMAGE_NAME:latest $IMAGE_NAME:master
|
||||
docker push $IMAGE_NAME:latest
|
||||
docker push $IMAGE_NAME:master
|
||||
elif [ "${CIRCLE_BRANCH}" = "feature/docker-deploy" ]; then
|
||||
docker tag $IMAGE_NAME:latest $IMAGE_NAME:test-deploy
|
||||
docker push $IMAGE_NAME:test-deploy
|
||||
docker push $IMAGE_NAME:stretch
|
||||
elif [ "${CIRCLE_BRANCH}" = "feat/docker-stretch" ]; then
|
||||
docker push $IMAGE_NAME:stretch
|
||||
fi
|
||||
workflows:
|
||||
version: 2
|
||||
@@ -104,9 +123,8 @@ workflows:
|
||||
jobs:
|
||||
- unit_tests
|
||||
- test_demo
|
||||
- build-docker:
|
||||
requires:
|
||||
- unit_tests
|
||||
- build-docker
|
||||
- build-docker-stretch
|
||||
- all_tests:
|
||||
filters:
|
||||
branches:
|
||||
@@ -114,13 +132,13 @@ workflows:
|
||||
- master
|
||||
- /.*net.*/
|
||||
- /.*marf.*/
|
||||
- feature/ignore-slow-serial-tests
|
||||
- push-docker-tags:
|
||||
requires:
|
||||
- unit_tests
|
||||
- build-docker
|
||||
- build-docker-stretch
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- feature/docker-deploy
|
||||
- feat/docker-stretch
|
||||
|
||||
Reference in New Issue
Block a user