-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbatect.yml
129 lines (114 loc) · 2.93 KB
/
batect.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
project_name: aws-profile
containers:
build-env:
build_directory: .batect/build-env
volumes:
- local: .
container: /app
options: cached
- type: cache
name: go-cache
container: /go
- type: cache
name: golangci-cache
container: /root/.cache/golangci-lint/
working_directory: /app
environment:
GOCACHE: /go/cache
jfrog:
image: docker.bintray.io/jfrog/jfrog-cli-go:1.43.2
working_directory: /app
volumes:
- local: .
container: /app
options: cached
tasks:
clean:
run:
container: build-env
command: rm -rf /app/bin && rm -f /app/aws-profile
build-linux:
run:
container: build-env
command: /app/scripts/build.sh
environment:
VERSION_NUMBER: ${VERSION_NUMBER:-000}
OUTPUT: ${OUTPUT:-bin/aws-profile}
GOOS: ${GOOS:-linux}
GOARCH: ${GOARCH:-amd64}
prerequisites:
- clean
build-macos:
run:
container: build-env
command: /app/scripts/build.sh
environment:
VERSION_NUMBER: ${VERSION_NUMBER:-000}
OUTPUT: ${OUTPUT:-bin/aws-profile}
GOOS: ${GOOS:-darwin}
GOARCH: ${GOARCH:-amd64}
prerequisites:
- clean
build-windows:
run:
container: build-env
command: /app/scripts/build.sh
environment:
VERSION_NUMBER: ${VERSION_NUMBER:-000}
OUTPUT: ${OUTPUT:-bin/aws-profile}
GOOS: ${GOOS:-windows}
GOARCH: ${GOARCH:-amd64}
prerequisites:
- clean
lint:
run:
container: build-env
command: /app/scripts/lint.sh
test:
run:
container: build-env
command: /app/scripts/test.sh
generate-coverage-report:
run:
container: build-env
command: /app/scripts/generate-coverage-report.sh
e2e:
run:
container: build-env
entrypoint: /app/e2e/run.sh
command: /app/bin/aws-profile
environment:
GITHUB_TOKEN: ${GITHUB_TOKEN:-}
scan-security:
run:
container: build-env
command: /app/scripts/scan-security.sh
generate-artifactory-token:
run:
container: jfrog
command: /app/scripts/generate-artifactory-token.sh
environment:
CI: "true"
ACCESS_TOKEN: ${ACCESS_TOKEN}
NAME: aws-profile-uploader
GROUP: aws-profile-uploader
upload-to-artifactory:
run:
container: jfrog
command: /app/scripts/upload-to-artifactory.sh
environment:
CI: "true"
REPOSITORY: aws-profile
SOURCE_PATTERN: ./artifacts/aws-profile*
ACCESS_TOKEN: ${ACCESS_TOKEN}
VERSION_NUMBER: ${VERSION_NUMBER}
download-from-artifactory:
run:
container: jfrog
command: /app/scripts/download-from-artifactory.sh
environment:
CI: "true"
REPOSITORY: aws-profile
DESTINATION: ./artifacts/
ACCESS_TOKEN: ${ACCESS_TOKEN}
VERSION_NUMBER: ${VERSION_NUMBER}