-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
51 lines (45 loc) · 1016 Bytes
/
.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
image: ${DOCKER_USER}/gitlab-ci:latest
stages:
- test
- deploy
services:
- docker:dind
- postgres:latest
- redis:latest
variables:
POSTGRES_DB: engine_test
POSTGRES_USER: engine_test
POSTGRES_PASSWORD: bita123
E_MOCKERY_POSTGRES_HOST: postgres
E_SERVICES_POSTGRES_HOST: postgres
E_MOCKERY_REDIS_ADDRESS: redis
E_SERVICES_REDIS_ADDRESS: redis
GOPATH: "$CI_PROJECT_DIR/go"
REPO_DIR: "$CI_PROJECT_DIR/go/src/elbix.dev/engine"
GO111MODULE: "on"
before_script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- eval $(ssh-agent -s)
- echo "$DEPLOY_SERVER_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ${REPO_DIR}
- shopt -s extglob dotglob
- mv !(go|cache) "${REPO_DIR}"
- cd ${REPO_DIR}
Lint and Test:
stage: test
tags:
- elbix
script:
- make lint
- make test
Deploy Qollenge:
stage: deploy
only: ["/^master$/"]
script:
- make deploy-qollenge
Deploy Cerulean:
stage: deploy
only: ["/^master$/"]
script:
- make deploy-cerulean