.gitlab-ci.yml 1017 Bytes
Newer Older
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
 include:
   local: 'docker.gitlab-ci.yml'

 variables:
   DOCKER_HOST: tcp://localhost:2375
   DOCKER_DRIVER: overlay2

 stages:
   - version
   - build
   - deploy

 versioning:
   stage: version
   image: docker:19.03.4
   artifacts:
     paths:
       - shared-vars.sh
     expire_in: 1 day
   script:
     - echo "export VERSION=$(cat sga-daemon-*.rockspec | grep 'version[[:space:]]=[[:space:]]' | awk '{print $3}' | sed -e s/[\",]//g)" >> shared-vars.sh
   only:
     - master
     - tags

 static_check:
   stage: build
   image: repo.tecgraf.puc-rio.br:18089/soma/ubuntu:16.04-sga-posix
   script:
     - mkdir sgarest-daemon
     - curl -L https://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon/-/archive/master/sgarest-daemon-master.tar.gz | tar xzf - -C sgarest-daemon --strip-components 1
     - cd sgarest-daemon
     - export errors=$(luac5.3 -p sgad | find . -regex ".*\.lua"  | awk '{print "luac5.3 -p "$1}' | sh -) 
     - ([ -z "$errors" ] && exit 0 || exit 1)
   only:
     - master
     - tags