This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
forked from veepee-oss/influxdb-relay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
92 lines (82 loc) · 2.05 KB
/
.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
# https://docs.gitlab.com/ee/ci/docker/using_docker_build.html
stages:
- commit
- test
- build
- docker
# commit
# git-history:
# stage: commit
# script:
# - >
# bash <(curl --fail --location --silent --show-error
# https://git.io/vxIxF)
# lines-length:
# stage: commit
# script:
# - >
# bash <(curl --fail --location --silent --show-error
# https://git.io/vxIxN)
# test
dockerlint:
stage: test
image: vpgrp/linter:docker
allow_failure: true
script:
- find . -type f -name "Dockerfile" | xargs -I{} dockerlint {}
golint:
stage: test
image: vpgrp/linter:golang
allow_failure: true
script:
- go get github.com/GeertJohan/fgt
- find . -type f -name "*\.go" | xargs -I{} fgt golint {}
pylint:
stage: test
image: vpgrp/linter:python
allow_failure: true
script:
- find . -type f -name "*\.py" | xargs -I{} pylint {}
# build
build:
stage: build
image: vpgrp/golang:latest
allow_failure: true
before_script:
- apt-get update -qq -y
- apt-get install -qq -y git libffi-dev make python python-boto rsync
- mkdir -p /go/src/github.com/vente-privee/influxdb-relay
- rsync -az /builds/noc/ /go/src/github.com/vente-privee
script:
- cd /go/src/github.com/vente-privee/influxdb-relay
- python /go/src/github.com/vente-privee/influxdb-relay/build.py
goget:
stage: build
image: vpgrp/golang:latest
allow_failure: true
script:
- go get -u github.com/vente-privee/influxdb-relay
# docker
docker-build:
stage: docker
image: docker:latest
allow_failure: true
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay
script:
- docker build --file Dockerfile.build --rm --tag influxdb-relay-builder:latest .
- docker run --rm --volume $(pwd):/go/src/github.com/vente-privee/influxdb-relay influxdb-relay-builder
docker-goget:
stage: docker
image: docker:latest
allow_failure: true
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay
script:
- docker build --file Dockerfile --rm --tag influxdb-relay:latest .
# EOF