Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nogweii
my-certificate-alert
Commits
f9b8fd0f
Commit
f9b8fd0f
authored
Aug 17, 2021
by
Nogweii
Browse files
initial gitlab CI!
parent
d657563a
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
f9b8fd0f
image
:
golang:latest
variables
:
# this must be the same value as the first line of go.mod
REPO_NAME
:
nogweii.net/go/my-certificate-alert
# The problem is that to be able to use go get, one needs to put
# the repository in the $GOPATH. Making a symbolic link to the
# go module name (from go.mod) allows this.
before_script
:
-
mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
-
ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
-
cd $GOPATH/src/$REPO_NAME
stages
:
-
test
-
build
-
deploy
format
:
stage
:
test
script
:
-
go fmt src/
-
go vet src/
#- go test -race src/ # TODO: get unit tests
lint
:
image
:
golangci/golangci-lint:v1.42.0
stage
:
test
script
:
-
apt update -q
-
apt install -q -y jq
-
golangci-lint run --issues-exit-code 0 --out-format code-climate | tee gl-code-quality-report.json | jq -r '.[] | "\(.location.path):\(.location.lines.begin) \(.description)"'
artifacts
:
reports
:
codequality
:
gl-code-quality-report.json
paths
:
-
gl-code-quality-report.json
compile
:
stage
:
build
script
:
-
go build -race -o $CI_PROJECT_DIR/my-certificate-alert
artifacts
:
paths
:
-
my-certificate-alert
manpage
:
image
:
name
:
pandoc/core:2.14.1
entrypoint
:
[
"
/bin/sh"
,
"
-c"
]
stage
:
build
before_script
:
[]
script
:
-
pandoc --standalone --to man $CI_PROJECT_DIR/my-certificate-alert.1.md -o $CI_PROJECT_DIR/my-certificate-alert.1
artifacts
:
paths
:
-
my-certificate-alert.1
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment