-
Notifications
You must be signed in to change notification settings - Fork 0
/
codefresh.yml
71 lines (66 loc) · 1.46 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
version: '1.0'
build_version: 'v2'
mode: parallel
stages:
- setup
- test
- docker-release
steps:
main_clone:
title: Cloning main repository...
type: git-clone
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: '${{CF_REVISION}}'
build_builder:
type: build
stage: setup
title: Build builder image
dockerfile: Dockerfile-golang
image_name: ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}-builder
disable_push: true
tag: latest
when:
steps:
- name: main_clone
on:
- success
test:
title: Run tests
stage: test
image: ${{build_builder}}
working_directory: ${{main_clone}}
environment:
- GOPATH=/codefresh/volume/.go
commands:
- ./test.sh
when:
steps:
- name: build_builder
on:
- success
build_docker_frontend_release:
type: build
stage: docker-release
title: Build Docker image for frontend
image_name: ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}-ui
registry: dockerhub
working_directory: ./ui
tag: ${{CF_BRANCH}}
when:
steps:
- name: test
on:
- success
build_docker_backend_release:
type: build
stage: docker-release
title: Build Docker image for backend containing binary
image_name: ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}
registry: dockerhub
tag: ${{CF_BRANCH}}
target: release
when:
steps:
- name: build_docker_frontend_release
on:
- success