-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
65 lines (58 loc) · 1.5 KB
/
.gitlab-ci.yml
File metadata and controls
65 lines (58 loc) · 1.5 KB
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
image: alpine
stages:
- test
- build
- deploy
cache:
paths:
- target/
cargo-test:
stage: test
image: rust:latest
before_script:
- apt-get update -yqq
- apt-get install -yqq --no-install-recommends build-essential libsqlite3-dev libpq-dev default-libmysqlclient-dev
- rustup component add clippy
script:
- rustc --version && cargo --version # Print version info for debugging
- cargo check
- cargo clippy
- cargo test --all --verbose
docker-master:
image: docker:latest
stage: build
variables:
DOCKER_HOST: unix:///var/run/docker.sock
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
only:
- master
docker-develop:
image: docker:latest
stage: build
variables:
DOCKER_HOST: unix:///var/run/docker.sock
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "${CI_REGISTRY_IMAGE}:develop" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
only:
- develop
deploy-master:
image: appropriate/curl
stage: deploy
script:
- curl http://[215:c420:ccfe:37d1:ed42:c4ee:2669:1a8a]:9000/hooks/redeploy-webhook
only:
- master
deploy-develop:
image: appropriate/curl
stage: deploy
script:
- curl http://[215:ff81:c80b:a859:67dd:ab09:26bb:eb30]:9000/hooks/redeploy-webhook
only:
- develop