Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
yajsv - Yet Another Json Schema Validator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
SmartDataLab
public
CI-CD tools
yajsv - Yet Another Json Schema Validator
Commits
2a587360
Commit
2a587360
authored
10 months ago
by
Benguria Elguezabal, Gorka
Browse files
Options
Downloads
Patches
Plain Diff
gitlab ci for go releasing
parent
7d7fbe56
No related branches found
No related tags found
No related merge requests found
Pipeline
#157421
failed
10 months ago
Stage: build
Stage: test
Stage: publish
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+64
-0
64 additions, 0 deletions
.gitlab-ci.yml
.releaserc.yaml
+29
-0
29 additions, 0 deletions
.releaserc.yaml
sonar-project.properties
+22
-0
22 additions, 0 deletions
sonar-project.properties
with
115 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
64
−
0
View file @
2a587360
include
:
# Golang template
-
component
:
"
git.code.tecnalia.com/smartdatalab/public/ci-cd-components/golang/gitlab-ci-golang@master"
inputs
:
go-build-job-tags
:
[
"
docker"
]
go-test-job-tags
:
[
"
docker"
]
go-build-test-job-tags
:
[
"
docker"
]
test-flags
:
-mod=readonly -v
go-ci-lint-job-tags
:
[
"
docker"
]
go-mod-outdated-job-tags
:
[
"
docker"
]
go-sbom-job-tags
:
[
"
docker"
]
go-govulncheck-job-tags
:
[
"
docker"
]
target-os
:
linux
target-arch
:
amd64
ci-lint-disabled
:
false
ci-lint-args
:
--timeout 5m -E gosec,goimports ./...
sbom-disabled
:
false
vulncheck-disabled
:
false
# semantic-release template
-
component
:
"
git.code.tecnalia.com/smartdatalab/public/ci-cd-components/semantic-release/gitlab-ci-semrel@3"
inputs
:
auto-release-enabled
:
true
release-disabled
:
false
semantic-release-job-tags
:
[
"
docker"
]
branches-ref
:
"
/^(master|main)$/"
# sonar template
-
component
:
"
git.code.tecnalia.com/smartdatalab/public/ci-cd-components/sonar/gitlab-ci-sonar@master"
inputs
:
sonar-job-tags
:
[
"
docker"
]
# gitleaks template
-
component
:
"
git.code.tecnalia.com/smartdatalab/public/ci-cd-components/gitleaks/gitlab-ci-gitleaks@master"
inputs
:
gitleaks-job-tags
:
[
"
docker"
]
variables
:
GIT_STRATEGY
:
clone
# LOG_LEVEL: debug
# variables in the GitLab CI/CD variables:
# GITLAB_TOKEN to support the semantic-release: it should have the api scope, read_repository, and write_repository permissions. It should act as maintainer if you have protected branches, and tags as it is the case.
# SONAR_TOKEN to support the sonar
# SONAR_HOST_URL to support the sonar
# Pipeline steps
stages
:
-
build
-
test
-
package-build
-
package-test
-
deploy
-
acceptance
-
publish
-
production
go-build-test
:
variables
:
CGO_ENABLED
:
0
semantic-release
:
dependencies
:
-
go-build-test
This diff is collapsed.
Click to expand it.
.releaserc.yaml
0 → 100644
+
29
−
0
View file @
2a587360
plugins
:
-
'
@semantic-release/commit-analyzer'
-
'
@semantic-release/release-notes-generator'
-
-
'
@semantic-release/gitlab'
-
assets
:
-
path
:
bin/linux/amd64/docker-custom-network-mtu-changer
label
:
docker-custom-network-mtu-changer (linux/amd64)
# generates the CHANGELOG.md
-
'
@semantic-release/changelog'
# emulates bumpversion (replaces version in pyproject.toml)
-
-
semantic-release-replace-plugin
-
replacements
:
-
files
:
-
cmd/config.yaml
from
:
-
'
version:
*\d+\.\d+\.\d+'
to
:
'
version:
${nextRelease.version}'
countMatches
:
true
# git commit/push modified files (CHANGELOG.md & pyproject.toml)
-
-
'
@semantic-release/git'
-
assets
:
-
cmd/config.yaml
# the commit MUST trigger a pipeline on tag (to perform publish jobs)
# can be skipped on prod branch
message
:
'
chore(semantic-release):
release
${nextRelease.version}
-
[ci
skip
on
prod]'
branches
:
-
main
-
master
tagFormat
:
'
${version}'
This diff is collapsed.
Click to expand it.
sonar-project.properties
0 → 100644
+
22
−
0
View file @
2a587360
# From sonar setup
sonar.projectKey
=
smartdatalab_public_ci-cd-tools_yajsv_AZGdSUIulLHl6KbDPfWr
sonar.qualitygate.wait
=
true
# from golang component setup
# see: https://docs.sonarqube.org/latest/analyzing-source-code/test-coverage/test-execution-parameters/#go
# set your source directory(ies) here (relative to the sonar-project.properties file)
sonar.sources
=
.
# exclude unwanted directories and files from being analysed
sonar.exclusions
=
bin/**,**/*_test.go,**/vendor/**
# set your tests directory(ies) here (relative to the sonar-project.properties file)
sonar.tests
=
.
sonar.test.inclusions
=
**/*_test.go
sonar.test.exclusions
=
**/vendor/**
# tests report: JSON native format
sonar.go.tests.reportPaths
=
reports/go-test.native.json
# coverage report: native format
sonar.go.coverage.reportPaths
=
reports/go-coverage.native.out
# golanci-lint: checkstyle report (if enabled)
sonar.go.golangci-lint.reportPaths
=
reports/go-ci-lint.checkstyle.xml
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