Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
task
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaia-X
Trust Services API
task
Commits
5d0d3679
Commit
5d0d3679
authored
9 months ago
by
Kalin Daskalov
Browse files
Options
Downloads
Patches
Plain Diff
refactor ci file
parent
ad826ec8
No related branches found
Branches containing commit
Tags
v1.1.0
Tags containing commit
1 merge request
!18
chore: Update .gitlab-ci.yml and Dockerfile for CI/CD improvements
Pipeline
#71782
passed with stages
in 2 minutes and 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+9
-72
9 additions, 72 deletions
.gitlab-ci.yml
with
9 additions
and
72 deletions
.gitlab-ci.yml
+
9
−
72
View file @
5d0d3679
include
:
-
project
:
'
${HELPERS_PATH}'
file
:
svdh-cicd.yml
ref
:
main
file
:
'
cicd-template.yml'
-
project
:
'
${HELPERS_PATH}'
ref
:
main
file
:
'
go-template.yml'
variables
:
RUNNER_AMD
:
amd64-docker
DOCKER_FILE
:
./deployment/ci/Dockerfile
RUNNER_TAG
:
amd64-docker
GO_VERSION
:
1.22.4
GOLANGCI_LINT_VERSION
:
latest
stages
:
-
test
-
build
-
trigger-deploy
lint
:
image
:
golangci/golangci-lint:latest
stage
:
test
tags
:
-
amd64-docker
script
:
-
golangci-lint --version
-
golangci-lint run
before_script
:
-
ln -s /builds /go/src/code.vereign.com
-
cd /go/src/code.vereign.com/${CI_PROJECT_PATH}
unit tests
:
image
:
golang:${GO_VERSION}
extends
:
.gotest
stage
:
test
tags
:
-
amd64-docker
before_script
:
[]
coverage
:
'
/total:\s+\(statements\)\s+(\d+.\d+\%)/'
govulncheck
:
image
:
golang:${GO_VERSION}
stage
:
test
tags
:
-
amd64-docker
before_script
:
-
ln -s /builds /go/src/code.vereign.com
-
cd /go/src/code.vereign.com/${CI_PROJECT_PATH}
script
:
-
go version
-
go install golang.org/x/vuln/cmd/govulncheck@latest
-
govulncheck ./...
build-dev
:
extends
:
.docker-build-dev
stage
:
build
tags
:
-
$RUNNER_AMD
rules
:
# Only run if the branch is not main, the pipeline is not triggered by a merge request and the commit is not a tag
-
if
:
'
$CI_COMMIT_BRANCH
!=
"main"
&&
$CI_PIPELINE_SOURCE
!=
"merge_request_event"
&&
$CI_COMMIT_TAG
==
null'
build-stg
:
extends
:
.docker-build-dev
stage
:
build
tags
:
-
$RUNNER_AMD
rules
:
-
if
:
'
$CI_COMMIT_TAG'
deploy-dev
:
extends
:
.deploy-dev
stage
:
trigger-deploy
needs
:
-
job
:
build-dev
rules
:
# Only run if the branch is not main, the pipeline is not triggered by a merge request and the commit is not a tag
-
if
:
'
$CI_COMMIT_BRANCH
!=
"main"
&&
$CI_PIPELINE_SOURCE
!=
"merge_request_event"
&&
$CI_COMMIT_TAG
==
null'
deploy-stg
:
extends
:
.deploy-stg
stage
:
trigger-deploy
needs
:
-
job
:
build-stg
rules
:
-
if
:
'
$CI_COMMIT_TAG'
\ No newline at end of file
-
trigger-deploy
\ No newline at end of file
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