-
Notifications
You must be signed in to change notification settings - Fork 9
/
codefresh.yml
43 lines (43 loc) · 1.09 KB
/
codefresh.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
41
42
43
version: '1.0'
stages:
- prepare
- 'Microservice A'
- 'Microservice B'
steps:
main_clone:
title: Cloning main repository...
type: git-clone
repo: 'codefreshdemo/cf-example-unit-test'
revision: 'master'
git: github
stage: prepare
run_my_tests_before_build:
title: Running Unit tests directly
stage: 'Microservice A'
image: golang:1.12
working_directory: './golang-app-A'
commands:
- go test -v
build_after_my_tests:
title: Building Go Docker Image
type: build
stage: 'Microservice A'
image_name: my-go-image
working_directory: './golang-app-A'
tag: 'master'
dockerfile: Dockerfile
build_before_my_tests:
title: Building Python Docker Image
type: build
stage: 'Microservice B'
image_name: my-python-image
working_directory: './python-app-B'
tag: 'master'
dockerfile: Dockerfile
run_my_tests_inside_image:
title: Running Unit tests inside App image
stage: 'Microservice B'
image: ${{build_before_my_tests}}
working_directory: '/app'
commands:
- python setup.py test