Feature/pipeline
This commit is contained in:
@@ -1,81 +1,5 @@
|
||||
stages:
|
||||
- compliance
|
||||
- build
|
||||
- package
|
||||
- publish
|
||||
- deploy
|
||||
|
||||
include:
|
||||
- template: Security/Secret-Detection.gitlab-ci.yml
|
||||
- local: .variables.yml
|
||||
- project: 'developerdurp/yml'
|
||||
ref: 'main'
|
||||
file:
|
||||
- 'jobs/gitlab.yml'
|
||||
- 'jobs/octopus.yml'
|
||||
- 'jobs/version.yml'
|
||||
- 'jobs/sonarqube.yml'
|
||||
- 'jobs/golang.yml'
|
||||
- 'jobs/docker.yml'
|
||||
|
||||
secret_detection:
|
||||
stage: compliance
|
||||
rules:
|
||||
- if: $CI_MERGE_REQUEST_IID
|
||||
allow_failure: false
|
||||
|
||||
sonarqube:
|
||||
extends: .sonarcloud-check
|
||||
stage: compliance
|
||||
allow_failure: true
|
||||
rules:
|
||||
- if: $CI_COMMIT_REF_NAME == 'main' || $CI_MERGE_REQUEST_IID
|
||||
exists:
|
||||
- "sonar-project.properties"
|
||||
|
||||
golang-lint:
|
||||
extends: .golang-lint
|
||||
stage: compliance
|
||||
rules:
|
||||
- if: $CI_MERGE_REQUEST_IID
|
||||
exists:
|
||||
- "go.mod"
|
||||
|
||||
version:
|
||||
extends: .version
|
||||
stage: .pre
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/'
|
||||
|
||||
gobuild:
|
||||
image: registry.internal.durp.info/golang:${GO_VERSION}
|
||||
variables:
|
||||
GOPROXY: https://nexus.durp.info/repository/go/
|
||||
extends: .golang-build
|
||||
stage: build
|
||||
|
||||
docker:
|
||||
extends: .docker-build-container
|
||||
stage: publish
|
||||
needs:
|
||||
- job: gobuild
|
||||
artifacts: true
|
||||
- job: version
|
||||
artifacts: true
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/'
|
||||
|
||||
publish:
|
||||
extends: .octo_release
|
||||
stage: publish
|
||||
needs:
|
||||
- job: version
|
||||
artifacts: true
|
||||
- job: docker
|
||||
artifacts: true
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/' && $OCTO_PROJECT_NAME
|
||||
exists:
|
||||
- ".octopus/*"
|
||||
- when: never
|
||||
|
||||
ref: main
|
||||
file: 'pipeline.yml'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
linters:
|
||||
disable:
|
||||
- typecheck
|
||||
- errcheck
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
variables:
|
||||
GO_VERSION: '1.22'
|
||||
GOLANGCI_LINT_VERISON: "v1.54"
|
||||
SYFT_VERSION: "v1.3.0"
|
||||
GRYPE_VERSION: "v0.77.2"
|
||||
|
||||
Reference in New Issue
Block a user