-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
70 lines (63 loc) · 1.23 KB
/
.gitlab-ci.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
stages:
- test
- build
- release
variables:
CARGO_HOME: $CI_PROJECT_DIR/.cargo
cache:
paths:
- $CI_PROJECT_DIR/.cargo
test:
stage: test
image: registry.snap.lizlan:5000/factory-ci-runner:rust
script:
- cp pg-client-config/fixtures/passfile.conf.in pg-client-config/fixtures/passfile.conf
- chmod 0600 pg-client-config/fixtures/passfile.conf
- cargo test
environment:
name: snap
tags:
- infrav3-plain
dev:docker:
stage: build
script:
- make -C .docker build deliver
environment:
name: snap
only:
refs:
- tags
- main
tags:
- infrav3-dind
release:docker:
stage: release
script:
- make -C .docker build deliver
- $FACTORY_SCRIPTS/release-image.sh pg-event-server
environment:
name: production
artifacts:
paths:
- ".docker/factory.manifest"
when: manual
only:
refs:
- tags
tags:
- infrav3-dind
variables:
FACTORY_MANIFEST: ".docker/factory.manifest"
package:deb:
stage: release
image: registry.snap.lizlan:5000/factory-ci-runner:rust
script:
- cargo deb -p pg-event-server
- cp -v target/debian/*.deb /srv/storage/debs/
environment:
name: snap
only:
refs:
- tags
tags:
- infrav3-plain