81 lines
1.5 KiB
YAML
81 lines
1.5 KiB
YAML
stages:
|
|
- deploy
|
|
- staging
|
|
- production
|
|
|
|
include:
|
|
- project: "developerdurp/yml"
|
|
ref: "main"
|
|
file:
|
|
- "jobs/version.yml"
|
|
- "jobs/gitlab.yml"
|
|
|
|
variables:
|
|
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
|
|
GO_VERSION: "1.22"
|
|
GOLANGCI_LINT_VERISON: "v1.58.0"
|
|
UPLOAD_PACKAGE: "false"
|
|
PROJECT_NAME: $CI_PROJECT_NAME
|
|
GITLAB_PROJECT_ID: "45028985"
|
|
GITLAB_CHART_PATH: "durpapi%2FChart.yaml"
|
|
|
|
version:
|
|
extends: .version
|
|
stage: .pre
|
|
|
|
build:
|
|
stage: deploy
|
|
allow_failure: false
|
|
trigger:
|
|
include:
|
|
- project: "developerdurp/yml"
|
|
ref: "main"
|
|
file:
|
|
- "pipelines/go-build.yml"
|
|
strategy: depend
|
|
rules:
|
|
- exists:
|
|
- "go.mod"
|
|
|
|
generate-config-staging:
|
|
extends: .generate-config
|
|
stage: staging
|
|
variables:
|
|
ENVIRONMENT: "dev"
|
|
|
|
child-pipeline-staging:
|
|
stage: staging
|
|
needs:
|
|
- job: generate-config-staging
|
|
trigger:
|
|
include:
|
|
- artifact: generated-config.yml
|
|
job: generate-config-staging
|
|
variables:
|
|
ENVIRONMENT: "dev"
|
|
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
|
|
|
|
generate-config-production:
|
|
extends: .generate-config
|
|
stage: production
|
|
when: manual
|
|
needs:
|
|
- job: version
|
|
artifacts: true
|
|
- job: generate-config-staging
|
|
- job: child-pipeline-staging
|
|
variables:
|
|
ENVIRONMENT: "prd"
|
|
|
|
child-pipeline-production:
|
|
stage: production
|
|
needs:
|
|
- job: generate-config-production
|
|
trigger:
|
|
include:
|
|
- artifact: generated-config.yml
|
|
job: generate-config-production
|
|
variables:
|
|
ENVIRONMENT: "prd"
|
|
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
|