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
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
Merged
Merge GitLab CI config
ci
into
main
Overview
0
Commits
5
Pipelines
2
Changes
2
Merged
Thomas Schneider
requested to merge
ci
into
main
3 years ago
Overview
0
Commits
5
Pipelines
2
Changes
2
Expand
0
0
Merge request reports
Compare
main
version 1
85a32e74
3 years ago
main (base)
and
latest version
latest version
88ec62ca
5 commits,
3 years ago
version 1
85a32e74
4 commits,
3 years ago
2 files
+
40
−
8
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
.gitlab-ci.yml
+
40
−
7
Options
---
---
image
:
debian:buster
variables
:
variables
:
GOCACHE
:
$CI_PROJECT_DIR/.gocache
GOCACHE
:
$CI_PROJECT_DIR/.gocache
GOPATH
:
$CI_PROJECT_DIR/.go
GOPATH
:
$CI_PROJECT_DIR/.go
PACKAGE_REGISTRY_URL
:
>-
$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/needrestart2prom
cache
:
cache
:
paths
:
paths
:
-
.gocache
-
.gocache
-
.go
-
.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
:
build
:
image
:
golang:1-buster
stage
:
build
before_script
:
-
go version
script
:
script
:
-
go build -o $CI_PROJECT_NAME-$GOOS-$GOARCH
-
go build -o $CI_PROJECT_NAME-$GOOS-$GOARCH
artifacts
:
artifacts
:
@@ -29,3 +28,37 @@ build:
@@ -29,3 +28,37 @@ build:
GOARCH
:
GOARCH
:
-
amd64
-
amd64
-
arm
-
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