Skip to content
Snippets Groups Projects
Commit bbb28a38 authored by Erick Hitter's avatar Erick Hitter
Browse files

Update with latest CI template

parent c0e8efa4
Branches
Tags
1 merge request!2Update how webhooks are sent
Pipeline #85 passed
This commit is part of merge request !2. Comments created here will be created in the context of that merge request.
# This file is a template, and might need editing before it works on your project. # This file is a template, and might need editing before it works on your project.
image: golang:latest image: golang:latest
variables:
REPO_NAME: git.ethitter.com/debian/eth-log-alerting
# The problem is that to be able to use go get, one needs to put # The problem is that to be able to use go get, one needs to put
# the repository in the $GOPATH. So for example if your gitlab domain # the repository in the $GOPATH. So for example if your gitlab domain
# is mydomainperso.com, and that your repository is repos/projectname, and # is gitlab.com, and that your repository is namespace/project, and
# the default GOPATH being /go, then you'd need to have your # the default GOPATH being /go, then you'd need to have your
# repository in /go/src/mydomainperso.com/repos/projectname # repository in /go/src/gitlab.com/namespace/project
# Thus, making a symbolic link corrects this. # Thus, making a symbolic link corrects this.
before_script: before_script:
- ln -s /builds /go/src/git.ethitter.com - mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
- cd /go/src/git.ethitter.com/debian/eth-log-alerting - ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
- go version - cd $GOPATH/src/$REPO_NAME
- go version
- go get github.com/asaskevich/govalidator
- go get github.com/ashwanthkumar/slack-go-webhook
- go get github.com/hpcloud/tail
stages: stages:
- test - test
- build - build
format: format:
stage: test stage: test
script: script:
# Add here all the dependencies, or use glide/govendor to get - go tool vet -composites=false -shadow=true *.go
# them automatically. - go test -race $(go list ./... | grep -v /vendor/)
# - curl https://glide.sh/get | sh
- go get github.com/asaskevich/govalidator
- go get github.com/ashwanthkumar/slack-go-webhook
- go get github.com/hpcloud/tail
- go get github.com/alecthomas/kingpin
- go tool vet -composites=false -shadow=true *.go
- go test -race $(go list ./... | grep -v /vendor/)
compile: compile:
stage: build stage: build
script: script:
# Add here all the dependencies, or use glide/govendor/... - go build -race -ldflags "-extldflags '-static'" -o eth-log-alerting
# to get them automatically. artifacts:
- go get github.com/42wim/matterbridge/matterhook paths:
- go get github.com/asaskevich/govalidator - eth-log-alerting
- go get github.com/hpcloud/tail
- go get github.com/alecthomas/kingpin
# Better put this in a Makefile
- go build -race -ldflags "-extldflags '-static'" -o eth-log-alerting
artifacts:
paths:
- eth-log-alerting
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment