build: circleci: switch to 'machine' executor for test-build-in-docker job

refs #356
This commit is contained in:
Christian Schwarz 2020-08-25 23:34:09 +02:00
parent 7f1695c457
commit c44dccc34b

View File

@ -129,29 +129,18 @@ jobs:
docker: docker:
- image: circleci/golang:1.14 - image: circleci/golang:1.14
# this job tries to mimic the build-in-docker instructions # this job tests the build-in-docker instructions
# given in docs/installation.rst # given in docs/installation/compile-from-source.rst
#
# However, CircleCI doesn't support volume mounts, so we have to copy
# the source into the build-container by modifying the Dockerfile
test-build-in-docker: test-build-in-docker:
description: Check that build-in-docker works description: Check that build-in-docker works
docker: machine:
- image: circleci/golang:latest image: default
environment:
working_directory: /go/src/github.com/zrepl/zrepl
steps: steps:
- checkout - checkout
- setup_remote_docker - run: docker build -t zrepl_build -f build.Dockerfile .
- run: - run:
name: (hacky) circleci doesn't allow volume mounts, so copy src to container command: |
command: echo "ADD . /src" >> build.Dockerfile docker run -it --rm \
- run: -v "${PWD}:/src" \
name: (hacky) commit modified Dockerfile to avoid failing git clean check in Makefile --user "$(id -u):$(id -g)" \
command: git -c user.name='circleci' -c user.email='circleci@localhost' commit -m 'CIRCLECI modified Dockerfile with zrepl src' --author 'autoauthor <circleci@localhost>' -- build.Dockerfile zrepl_build make release
- run:
name: build the build image (build deps)
command: docker build -t zrepl_build -f build.Dockerfile .
- run:
name: try compiling
command: docker run -it zrepl_build make release