-
Notifications
You must be signed in to change notification settings - Fork 0
/
.estafette.yaml
115 lines (102 loc) · 2.74 KB
/
.estafette.yaml
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
builder:
track: dev
labels:
app-group: estafette-ci
type: service
team: estafette
language: golang
version:
semver:
major: 1
minor: 4
patch: 0
stages:
build:
image: golang:1.20-alpine
env:
CGO_ENABLED: 0
GOOS: linux
GOGC: off
commands:
- go test -short ./...
- go build -a -installsuffix cgo -ldflags "-X main.appgroup=${ESTAFETTE_LABEL_APP_GROUP} -X main.app=${ESTAFETTE_GIT_NAME} -X main.version=${ESTAFETTE_BUILD_VERSION} -X main.revision=${ESTAFETTE_GIT_REVISION} -X main.branch=${ESTAFETTE_GIT_BRANCH} -X main.buildDate=${ESTAFETTE_BUILD_DATETIME}" -o ./publish/${ESTAFETTE_GIT_NAME} .
bake:
image: extensions/docker:dev
action: build
repositories:
- estafette
path: ./publish
copy:
- /etc/ssl/certs/ca-certificates.crt
- ./migrations
check-container:
parallelStages:
check-efficiency:
image: extensions/docker:dev
action: dive
repositories:
- estafette
vulnerability-scan:
image: extensions/docker:dev
action: trivy
repositories:
- estafette
test-migration-against-cockroachdb:
services:
- name: cockroachdb
image: cockroachdb/cockroach:v21.1.8
env:
COCKROACH_SKIP_ENABLING_DIAGNOSTIC_REPORTING: "true"
readiness:
path: /health?ready=1
port: 8080
timeoutSeconds: 120
commands:
- /cockroach/cockroach start-single-node --insecure --advertise-addr estafette-ci-db-public
image: estafette/estafette-ci-db-migrator:${ESTAFETTE_BUILD_VERSION}
env:
DB_HOST: cockroachdb
DB_INSECURE: true
ESTAFETTE_LOG_FORMAT: console
test-migration-against-postgres:
services:
- name: postgres
image: postgres:13.3-alpine
env:
POSTGRES_PASSWORD: abc
readinessProbe:
httpGet:
path: /health?ready=1
port: 8080
timeoutSeconds: 120
image: estafette/estafette-ci-db-migrator:${ESTAFETTE_BUILD_VERSION}
env:
DB_HOST: postgres
DB_USER: postgres
DB_PASSWORD: abc
DB_DATABASE: postgres
DB_INSECURE: true
DB_PORT: 5432
DB_ESTAFETTE_LOG_FORMAT: console
push-to-docker-hub:
image: extensions/docker:dev
action: push
repositories:
- estafette
tags:
- ${ESTAFETTE_BUILD_VERSION_MAJOR}.${ESTAFETTE_BUILD_VERSION_MINOR}
- ${ESTAFETTE_BUILD_VERSION_MAJOR}
- latest
tag-revision:
image: bitnami/git
commands:
- git tag ${ESTAFETTE_BUILD_VERSION}
- git push origin ${ESTAFETTE_BUILD_VERSION}
slack-notify:
image: extensions/slack-build-status:dev
workspace: estafette
channels:
- '#build-status'
when:
status == 'succeeded' ||
status == 'failed'