I have my own docker images which run by docker-compose
Also I have 2 jobs for now and each of them build the same application to run tests.
I have the same code:
machine: true # Use a Linux VM instead of docker environment
working_directory: ~/bone
steps:
- checkout
- run: docker network create bone-net
- run: docker-compose up -d
- run: docker exec bone yarn install --no-cache
Do I can use one build result in many jobs?
version: 2
jobs:
build:
machine: true # Use a Linux VM instead of docker environment
working_directory: ~/bone
steps:
- checkout
- run: docker network create bone-net
- run: docker-compose up -d
- run: docker exec bone yarn install --no-cache
- run:
name: Test BONE Frontend
command: docker exec bone yarn lint:client && docker exec bone yarn coverage:client --runInBand
no_output_timeout: 30m
- run:
name: Test BONE Backend
command: docker exec bone yarn lint:backend && docker exec bone yarn coverage:backend --runInBand
no_output_timeout: 30m
- store_artifacts:
path: docs/bone/1.0.0/
prefix: coverage
- store_artifacts:
path: docs/bone/1.0.0/clover.xml
prefix: tests
integration_tests:
machine: true # Use a Linux VM instead of docker environment
working_directory: ~/bone
steps:
- checkout
- run: docker network create bone-net
- run: docker-compose up -d
- run: docker exec bone yarn install --no-cache
- run:
name: Test BONE integration db tests
command: docker exec bone yarn db
no_output_timeout: 30m
workflows:
version: 2
unit_and_integration_tests:
jobs:
- build
- integration_tests