@@ -17,38 +17,30 @@ steps:
17
17
repo : ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}
18
18
revision : ${{CF_BRANCH}}
19
19
20
- build_helper_image :
20
+ prepare_env_vars : &deps
21
21
stage : Prepare
22
- title : build helper image
23
- type : build
24
- image_name : helper
25
- tag : ${{CF_BRANCH_TAG_NORMALIZED}}
26
- dockerfile :
27
- content : |-
28
- FROM golang:1.16.3-alpine3.13
29
- RUN apk -U add --no-cache ca-certificates git make gcc g++ curl bash && update-ca-certificates
30
- ENTRYPOINT [ "/bin/bash" ]
31
- buildkit : true
32
- disable_push : true
22
+ title : prepare-env
23
+ image : quay.io/roi_codefresh/golang-ci-helper:latest
24
+ commands :
25
+ - cf_export GO111MODULE=on
26
+ - cf_export GOCACHE=/codefresh/volume/gocache # change gopath to codefresh shared volume
27
+ - cf_export GOPATH=/codefresh/volume/gopath
28
+ - cf_export PATH=$PATH:/codefresh/volume/gopath/bin
33
29
when :
34
30
steps :
35
31
- name : main_clone
36
32
on :
37
33
- success
38
34
39
- prepare_env_vars : &deps
35
+ download_modules :
36
+ << : *deps
40
37
stage : Prepare
41
- title : prepare-env & download modules
42
- image : ${{build_helper_image}}
38
+ title : download modules
43
39
commands :
44
- - cf_export GO111MODULE=on
45
- - cf_export GOCACHE=/codefresh/volume/gocache # change gopath to codefresh shared volume
46
- - cf_export GOPATH=/codefresh/volume/gopath
47
- - cf_export PATH=$PATH:/codefresh/volume/gopath/bin
48
40
- go mod download -x
49
41
when :
50
42
steps :
51
- - name : build_helper_image
43
+ - name : prepare_env_vars
52
44
on :
53
45
- success
54
46
61
53
- make check-worktree
62
54
when :
63
55
steps :
64
- - name : prepare_env_vars
56
+ - name : download_modules
65
57
on :
66
58
- success
67
59
74
66
- make check-worktree
75
67
when :
76
68
steps :
77
- - name : prepare_env_vars
69
+ - name : download_modules
78
70
on :
79
71
- success
80
72
0 commit comments