-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfig.yml
40 lines (40 loc) · 1.24 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
version: 2
jobs:
build-test-push:
machine:
docker_layer_caching: true
steps:
- checkout
- run:
name: Build base pipeline image
command: docker build -f Dockerfile-base -t foxsec-pipeline-base:latest .
- run:
name: Spotless check
command: bin/m spotless:check
- run:
name: Javadoc (checkstyle) check
command: bin/m checkstyle:check
- run:
name: Generate version.json
command: bin/write_version_json.sh
- run:
name: Build complete pipeline image
command: docker build -f Dockerfile-complete -t foxsec-pipeline:latest .
- run:
name: Test pipeline in complete pipeline image
command: docker run -ti --rm foxsec-pipeline:latest mvn test
- run:
name: Test contrib in complete pipeline image
command: docker run -ti --rm foxsec-pipeline:latest bin/run_contrib_tests.sh
- run:
name: Push to Dockerhub
command: |
if [[ "${CIRCLE_BRANCH}" == "master" || -n "${CIRCLE_TAG}" ]]; then bin/docker_push.sh; fi
workflows:
version: 2
main:
jobs:
- build-test-push:
filters:
tags:
only: /.*/