Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
eth-log-alerting
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Server Tools
eth-log-alerting
Commits
bbb28a38
Commit
bbb28a38
authored
6 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
Update with latest CI template
parent
c0e8efa4
Branches
Branches containing commit
Tags
Tags containing commit
Loading
Pipeline
#85
passed
6 years ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+26
-31
26 additions, 31 deletions
.gitlab-ci.yml
with
26 additions
and
31 deletions
.gitlab-ci.yml
+
26
−
31
View file @
bbb28a38
# This file is a template, and might need editing before it works on your project.
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 repository in the $GOPATH. So for example if your gitlab domain
# is
mydomainperso
.com, and that your repository is
repos
/project
name
, and
# is
gitlab
.com, and that your repository is
namespace
/project, and
# the default GOPATH being /go, then you'd need to have your
# repository in /go/src/
mydomainperso.com/repos
/project
name
# repository in /go/src/
gitlab.com/namespace
/project
# Thus, making a symbolic link corrects this.
before_script
:
-
ln -s /builds /go/src/git.ethitter.com
-
cd /go/src/git.ethitter.com/debian/eth-log-alerting
-
go version
-
mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
-
ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
-
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
:
-
test
-
build
-
test
-
build
format
:
stage
:
test
script
:
# Add here all the dependencies, or use glide/govendor to get
# them automatically.
# - 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/)
stage
:
test
script
:
-
go tool vet -composites=false -shadow=true *.go
-
go test -race $(go list ./... | grep -v /vendor/)
compile
:
stage
:
build
script
:
# Add here all the dependencies, or use glide/govendor/...
# to get them automatically.
-
go get github.com/42wim/matterbridge/matterhook
-
go get github.com/asaskevich/govalidator
-
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
stage
:
build
script
:
-
go build -race -ldflags "-extldflags '-static'" -o eth-log-alerting
artifacts
:
paths
:
-
eth-log-alerting
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment