.gitlab-ci.yml 1020 Bytes
Newer Older
lukasburgey's avatar
lukasburgey committed
1
2
image: golang:1.13-alpine

Lukas Burgey's avatar
Add CI    
Lukas Burgey committed
3
4
5
stages:
  - lint
  - build
Lukas Burgey's avatar
Lukas Burgey committed
6
  - deploy
Lukas Burgey's avatar
Add CI    
Lukas Burgey committed
7
8
9
10

lint:
  stage: lint
  script:
Lukas Burgey's avatar
Lukas Burgey committed
11
12
    - apk add --no-cache git make
    - make lint
Lukas Burgey's avatar
Add CI    
Lukas Burgey committed
13
14
15
16

build:
  stage: build
  script:
Lukas Burgey's avatar
Lukas Burgey committed
17
    - apk add --no-cache git make
Lukas Burgey's avatar
Lukas Burgey committed
18
    - make build-static
lukasburgey's avatar
lukasburgey committed
19
    - ./feudalClient --version
Lukas Burgey's avatar
Add CI    
Lukas Burgey committed
20
21
22
  artifacts:
    paths:
      - feudalClient
Lukas Burgey's avatar
Lukas Burgey committed
23

lukasburgey's avatar
lukasburgey committed
24
# this needs a volume mounted to the docker runner like so:
25
# volumes = ["/path/to/binaries:/deployDestination:rw"]
Lukas Burgey's avatar
Lukas Burgey committed
26
deploy-dev:
Lukas Burgey's avatar
Lukas Burgey committed
27
28
29
  stage: deploy
  only:
    - dev
Lukas Burgey's avatar
Lukas Burgey committed
30
31
32
33
  environment:
    name: dev
  dependencies:
    - build
lukasburgey's avatar
lukasburgey committed
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  script:
    - mkdir -p /deployDestination/dev
    - cp feudalClient /deployDestination/dev
    - date -Iseconds > /deployDestination/dev/lastCIDeploy

# this needs a volume mounted to the docker runner like so:
# volumes = ["/path/to/binaries:/deployDestination:rw"]
deploy-master:
  stage: deploy
  only:
    - master
  environment:
    name: master
  dependencies:
    - build
Lukas Burgey's avatar
Lukas Burgey committed
49
  script:
50
51
    - cp feudalClient /deployDestination
    - date -Iseconds > /deployDestination/lastCIDeploy