-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
38 lines (34 loc) · 840 Bytes
/
.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
---
# -*- coding: utf-8 -*-
stages:
- lint-test
- build
- dockerize
go-lint-test:
stage: lint-test
image: golang:1.11
before_script:
- go get -u golang.org/x/lint/golint
- go get -u github.com/gin-gonic/gin
script:
- golint -set_exit_status echoenv.go
- go test .
go-build:
stage: build
image: golang:1.11
before_script:
- go get -u github.com/gin-gonic/gin
script:
- go build -v .
docker-build:
stage: dockerize
image: docker:stable
services:
- docker:dind
before_script:
- docker info
script:
- docker build -t simonkrenger/echoenv:$CI_COMMIT_REF_NAME -t simonkrenger/echoenv:latest .
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push simonkrenger/echoenv:$CI_COMMIT_REF_NAME
- docker push simonkrenger/echoenv:latest