Commit 678a30a9 authored by Carlos Juliano Viana's avatar Carlos Juliano Viana
Browse files

Merge branch 'fix/SOMA-4525_AjusteCICD' into 'master'

[SOMA-4525] Ajuste nos jobs de obtenção da versão

See merge request !50
parents dd7db05c c52cba4d
Pipeline #35764 passed with stages
in 51 seconds
include:
include:
local: 'docker.gitlab-ci.yml'
variables:
DOCKER_HOST: tcp://localhost:2375
DOCKER_DRIVER: overlay2
variables:
DOCKER_HOST: tcp://localhost:2375
DOCKER_DRIVER: overlay2
stages:
- version
- build
- deploy
stages:
- version
- build
- deploy
versioning:
.versioning_template:
stage: version
image: docker:19.03.4
artifacts:
paths:
- shared-vars.sh
expire_in: 1 day
expire_in: 1 week
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
- echo $SGA_VERSION
- echo "export VERSION=$SGA_VERSION" >> shared-vars.sh
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
versioning_master:
extends: .versioning_template
before_script:
- export SGA_VERSION="latest"
only:
- master
versioning_tag:
extends: .versioning_template
before_script:
- export SGA_VERSION=$(cat sga-daemon-*.rockspec | grep 'version[[:space:]]=[[:space:]]' | awk '{print $3}' | sed -E s/-[0-9]+//g | sed -E s/\"//g)
only:
- 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/${CI_COMMIT_REF_NAME}/sgarest-daemon-${CI_COMMIT_REF_NAME}.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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment