diff --git a/pipeline.yml b/pipeline.yml index 5558f89..7db7420 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -6,6 +6,15 @@ variables: GO_VERSION: "1.20" GOLANGCI_LINT_VERISON: "v1.55.2" + + + + + + + + + compliance: stage: compliance trigger: @@ -42,3 +51,5 @@ build_go_api: - 'pipelines/golang.yml' rules: - if: '$PIPELINE =~ /goapi/' + exists: + - "go.mod" diff --git a/pipelines/gitlab_generic_packages.yml b/pipelines/gitlab_generic_packages.yml index e196ceb..e2a55c2 100644 --- a/pipelines/gitlab_generic_packages.yml +++ b/pipelines/gitlab_generic_packages.yml @@ -59,5 +59,9 @@ publish: - job: upload rules: - if: $CI_COMMIT_BRANCH =~ '/^release/' + exists: + - $OCTO_PROJECT_NAME - if: $CI_COMMIT_BRANCH =~ 'main' + exists: + - $OCTO_PROJECT_NAME - when: never diff --git a/pipelines/golang.yml b/pipelines/golang.yml index 3f7039d..5f044c5 100644 --- a/pipelines/golang.yml +++ b/pipelines/golang.yml @@ -7,6 +7,7 @@ include: - project: 'developerdurp/yml' ref: 'main' file: + - 'jobs/octopus.yml' - 'jobs/version.yml' - 'jobs/sonarqube.yml' - 'jobs/golang.yml' @@ -37,3 +38,20 @@ docker: - if: $CI_COMMIT_REF_NAME == 'main' - if: $CI_COMMIT_BRANCH =~ '/^release/' +publish: + extends: .octo_release + stage: publish + needs: + - job: package + artifacts: true + - job: version + artifacts: true + - job: upload + rules: + - if: $CI_COMMIT_BRANCH =~ '/^release/' + exists: + - $OCTO_PROJECT_NAME + - if: $CI_COMMIT_BRANCH =~ 'main' + exists: + - $OCTO_PROJECT_NAME + - when: never