Feature/pipeline

This commit is contained in:
2024-05-05 19:22:35 +00:00
parent d5e8f75619
commit ca73647ada
3 changed files with 5 additions and 78 deletions

View File

@@ -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'

View File

@@ -1,3 +1,4 @@
linters:
disable:
- typecheck
- errcheck

View File

@@ -1,3 +1,5 @@
variables:
GO_VERSION: '1.22'
GOLANGCI_LINT_VERISON: "v1.54"
SYFT_VERSION: "v1.3.0"
GRYPE_VERSION: "v0.77.2"