Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
policy
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Code
Merge requests
2
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
policy
Commits
ced0a4d6
Commit
ced0a4d6
authored
1 year ago
by
Kalin Daskalov
Committed by
Lyuben Penkovski
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove old deployment jobs in ci and pass app version as argument in dockerfile
parent
a06778ee
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+8
-81
8 additions, 81 deletions
.gitlab-ci.yml
deployment/ci/Dockerfile
+3
-1
3 additions, 1 deletion
deployment/ci/Dockerfile
with
11 additions
and
82 deletions
.gitlab-ci.yml
+
8
−
81
View file @
ced0a4d6
---
variables
:
HELPERS_FILE
:
docker-build.yml
HELM_HELPERS_FILE
:
helm-package.yml
APP_HELM_NAME
:
policy
DOCKER_FILE
:
deployment/ci/Dockerfile
stages
:
-
compile
-
test
-
build
-
manifest
-
lint
-
package
-
deploy
include
:
-
project
:
"
${HELPERS_PATH}"
file
:
"
${HELPERS_FILE}"
-
template
:
"
Workflows/Branch-Pipelines.gitlab-ci.yml"
-
project
:
'
gaiax/tsa/ci-helpers'
file
:
'
helm-package.yml'
before_script
:
-
ln -s /builds /go/src/gitlab.eclipse.org
-
cd /go/src/gitlab.eclipse.org/${CI_PROJECT_PATH}
lint
:
lint
ers
:
image
:
golangci/golangci-lint:latest
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
:
-
golangci-lint --version
-
golangci-lint run
...
...
@@ -37,69 +16,17 @@ lint:
unit tests
:
image
:
golang:1.21.3
extends
:
.gotest
stage
:
test
tags
:
-
amd64-docker
before_script
:
[]
script
:
-
go version
-
go test -race ./... -coverprofile=coverage.out
-
go tool cover -func=coverage.out
coverage
:
'
/total:\s+\(statements\)\s+(\d+.\d+\%)/'
govulncheck
:
image
:
golang:1.21.3
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 ./...
amd64
:
extends
:
.docker-build
stage
:
build
tags
:
-
amd64-docker
dockerize sync
:
stage
:
build
tags
:
-
amd64-docker
script
:
-
cd ./cmd/sync
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker build -t "${CI_REGISTRY_IMAGE}/sync:${CI_COMMIT_REF_NAME}" .
-
docker push "${CI_REGISTRY_IMAGE}/sync:${CI_COMMIT_REF_NAME}"
only
:
-
main
-
tags
-
integration
manifest
:
extends
:
.manifest-amd64
stage
:
manifest
cloud
:
extends
:
.manifest-cloud
stage
:
manifest
release
:
extends
:
.manifest-release
stage
:
manifest
helm-lint
:
image
:
${HELM_IMAGE}
extends
:
.helm-lint
stage
:
lint
tags
:
-
amd64-docker
helm-package
:
image
:
${HELM_IMAGE}
extends
:
.helm-package
stage
:
package
tags
:
-
amd64-docker
needs
:
[
"
helm-lint"
]
This diff is collapsed.
Click to expand it.
deployment/ci/Dockerfile
+
3
−
1
View file @
ced0a4d6
...
...
@@ -4,9 +4,11 @@ RUN apk add git
WORKDIR
/go/src/gitlab.eclipse.org/eclipse/xfsc/tsa/policy
ARG
APP_REPO_TAG
ADD
. .
RUN
CGO_ENABLED
=
0
GOOS
=
linux go build
-ldflags
=
"-X main.Version=
$
(
git describe
--tags
--always
)
"
-mod
=
vendor
-o
/tmp/policy ./cmd/policy/...
RUN
CGO_ENABLED
=
0
GOOS
=
linux go build
-ldflags
=
"-X main.Version=
$
APP_REPO_TAG
"
-mod
=
vendor
-o
/tmp/policy ./cmd/policy/...
FROM
alpine:3.17
as
runner
...
...
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