.gitlab-ci.yml 779 Bytes
Newer Older
zauberstuhl's avatar
zauberstuhl committed
1
image: golang:1.13
2

3 4 5 6
stages:
  - test
  - build

zauberstuhl's avatar
zauberstuhl committed
7
run go checks:
8
  stage: test
zauberstuhl's avatar
zauberstuhl committed
9
  script:
10
  - go build -o server
11 12 13 14 15 16

build docker image:
  stage: build
  before_script:
  - apt-get update && apt-get install -y curl
  - curl -L https://get.docker.com | bash -
zauberstuhl's avatar
zauberstuhl committed
17
  - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
18
  script:
zauberstuhl's avatar
zauberstuhl committed
19 20 21 22
  - docker build -t registry.git.feneas.org/feneas/federation/testsuite-server:$CI_COMMIT_TAG .
  - docker tag registry.git.feneas.org/feneas/federation/testsuite-server:$CI_COMMIT_TAG registry.git.feneas.org/feneas/federation/testsuite-server:latest
  - docker push registry.git.feneas.org/feneas/federation/testsuite-server:$CI_COMMIT_TAG
  - docker push registry.git.feneas.org/feneas/federation/testsuite-server:latest
23 24
  only:
  - tags