Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
needrestart2prom
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas Schneider
needrestart2prom
Merge requests
!1
Merge GitLab CI config
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Merge GitLab CI config
ci
into
main
Overview
0
Commits
5
Pipelines
2
Changes
1
Merged
Merge GitLab CI config
Thomas Schneider
requested to merge
ci
into
main
Aug 12, 2021
Overview
0
Commits
5
Pipelines
2
Changes
1
0
0
Merge request reports
Compare
main
version 1
85a32e74
Aug 12, 2021
main (base)
and
version 1
latest version
88ec62ca
5 commits,
Aug 12, 2021
version 1
85a32e74
4 commits,
Aug 12, 2021
1 file
+
40
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
.gitlab-ci.yml
+
40
−
7
View file @ 85a32e74
Edit in single-file editor
Open in Web IDE
Show full file
---
image
:
debian:buster
variables
:
GOCACHE
:
$CI_PROJECT_DIR/.gocache
GOPATH
:
$CI_PROJECT_DIR/.go
PACKAGE_REGISTRY_URL
:
>-
$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/needrestart2prom
cache
:
paths
:
-
.gocache
-
.go
before_script
:
-
echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list
-
apt-get update && apt-get -qq -y -t buster-backports install golang git
-
go version
build
:
image
:
golang:1-buster
stage
:
build
before_script
:
-
go version
script
:
-
go build -o $CI_PROJECT_NAME-$GOOS-$GOARCH
artifacts
:
@@ -29,3 +28,37 @@ build:
GOARCH
:
-
amd64
-
arm
lint
:
image
:
golangci/golangci-lint:v1.39-alpine
stage
:
test
needs
:
[]
script
:
-
>-
golangci-lint
run
-v
--max-issues-per-linter=0
--max-same-issues=0
--out-format=junit-xml
--timeout=10m
> golangci-output.xml
artifacts
:
paths
:
-
golangci-output.xml
reports
:
junit
:
golangci-output.xml
expire_in
:
7 days
upload
:
stage
:
deploy
image
:
curlimages/curl:latest
needs
:
-
build
rules
:
-
if
:
'
$CI_COMMIT_REF_NAME
==
$CI_DEFAULT_BRANCH'
script
:
-
|
for file in $CI_PROJECT_NAME-linux-amd64 $CI_PROJECT_NAME-linux-arm; do
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${file} ${PACKAGE_REGISTRY_URL}/${CI_COMMIT_REF}/${file} ;
done
Loading