-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.estafette.yaml
112 lines (102 loc) · 2.84 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
builder:
track: dev
labels:
type: service
app-group: estafette-ci
team: estafette
language: golang
version:
semver:
major: 1
minor: 5
patch: 5
triggers:
- name: migrator
pipeline:
name: github.com/estafette/estafette-ci-db-migrator
branch: main
builds:
branch: main
stages:
continues-integration:
parallelStages:
ci-api:
image: estafette/estafette-ci-api-cache
env:
CGO_ENABLED: 0
GOGC: off
GOOS: linux
commands:
- golangci-lint run --timeout 3m
- CGO_ENABLED=1 go test -short -race ./...
- go build -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} .
gcs-migrator:
image: estafette/gcs-migrator-base
commands:
- cd gcs-migrator
- pyinstaller --strip -F -n gcs-migrator server.py
- mkdir -p ../publish
- staticx --strip dist/gcs-migrator ../publish/gcs-migrator
integration-tests/db-migrator:
services:
- name: cockroachdb
multiStage: true
image: cockroachdb/cockroach:v21.1.8
env:
COCKROACH_SKIP_ENABLING_DIAGNOSTIC_REPORTING: "true"
readinessProbe:
httpGet:
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_TRIGGER_MIGRATOR_BUILD_VERSION}
env:
DB_HOST: cockroachdb
DB_DATABASE: defaultdb
DB_INSECURE: true
DB_PORT: 26257
DB_USER: root
DB_PASSWORD: ''
ESTAFETTE_LOG_FORMAT: console
integration-tests/db-integration:
image: estafette/estafette-ci-api-cache
env:
GOGC: off
DB_HOST: cockroachdb
DB_DATABASE: defaultdb
DB_INSECURE: true
DB_PORT: 26257
DB_USER: root
DB_PASSWORD: ''
commands:
- go test -run TestIntegration ./...
bake:
image: extensions/docker:dev
action: build
severity: unknown
repositories:
- estafette
path: .
copy:
- /etc/ssl/certs/ca-certificates.crt
push-to-docker-hub:
image: extensions/docker:dev
action: push
repositories:
- estafette
tag-revision:
image: bitnami/git
commands:
- git tag ${ESTAFETTE_BUILD_VERSION}
- git push origin ${ESTAFETTE_BUILD_VERSION}
when: status == 'succeeded' &&
branch == 'main'
slack-notify:
image: extensions/slack-build-status:dev
workspace: estafette
channels:
- '#build-status'
when: status == 'succeeded' ||
status == 'failed'