it would be nice to have
build jobs with different base Docker images. As best, they could build in parallel and the artifacts can then be merged together in a
deploy job afterwards. That way, it’s easier to use the official Docker images for different frameworks/languages.
As an example, we have a React website which communicates with a Go server behind. See the famous go-starter-kit.
So we have
Node.js as a framework and
Go as a language (framework). Both have official Docker images. Maintaining them as one integrated, own build image would be hard and not necessary as they are already there. Using them in separate CircleCI 2.0 build steps would make it easier and more concise.
config.yml could then look like this:
version: 2 jobs: build-go: working_directory: /root/circleci-test docker: - image: golang:alpine steps: - checkout - run: name: Go build command: go build . build-node: docker: - image: node:alpine steps: - checkout - run: name: NPM build command: | npm install $(npm bin)/webpack deploy: steps: - run: name: Docker build