forked from ayufan/gitlab-ci-multi-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
57 lines (48 loc) · 1.1 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
image: golang:1.6
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay
DOCKER_HOST: tcp://docker:2375
stages:
- build
- mirror
before_script:
- source ci/prepare
.build: &build-template
stage: build
script:
- source ci/build
- source ci/deploy "$CI_BUILD_NAME"
Development:
<<: *build-template
only:
- branches
except:
- master@gitlab-org/gitlab-ci-multi-runner
- tags@gitlab-org/gitlab-ci-multi-runner
Bleeding Edge:
<<: *build-template
only:
- master@gitlab-org/gitlab-ci-multi-runner
environment: bleeding_edge
Stable Release:
<<: *build-template
variables:
RELEASE: "true"
only:
- tags@gitlab-org/gitlab-ci-multi-runner
environment: stable_release
Mirror:
stage: mirror
script:
- mkdir -p ~/.ssh
- echo "$GITHUB_SSH_KEY" > ~/.ssh/id_rsa
- ssh-keyscan -H github.com > ~/.ssh/known_hosts
- chmod -R 0600 ~/.ssh/
- git remote add github [email protected]:ayufan/gitlab-ci-multi-runner.git
- git fetch github
- git push github "$CI_BUILD_REF_NAME" -f
only:
- master@gitlab-org/gitlab-ci-multi-runner
- tags@gitlab-org/gitlab-ci-multi-runner