This commit is contained in:
2024-05-26 09:35:48 -05:00
parent f51c0758a6
commit 1f9b5aae30

View File

@@ -3,74 +3,88 @@ stages:
- staging - staging
- production - production
include:
- project: 'developerdurp/yml'
ref: 'main'
file:
- 'jobs/version.yml'
- 'jobs/gitlab.yml'
variables: variables:
PARENT_PIPELINE_ID: $CI_PIPELINE_ID VAULT_SERVER_URL: https://vault.internal.durp.info
GO_VERSION: "1.22" VAULT_AUTH_ROLE: gitlab
GOLANGCI_LINT_VERISON: "v1.58.0"
UPLOAD_PACKAGE: "false"
PROJECT_NAME: $CI_PROJECT_NAME
version: job_using_vault:
extends: .version id_tokens:
stage: .pre VAULT_ID_TOKEN:
aud: https://gitlab.com
secrets:
DATABASE_PASSWORD:
vault: gitlab-ci/test/test
token: $VAULT_ID_TOKEN
#build: test:
# stage: deploy stage: deploy
# allow_failure: false image: registry.internal.durp.info/debian:latest
# trigger: script:
# include: - echo $DATABASE_PASSWORD
# - project: 'developerdurp/yml' #include:
# ref: 'main' # - project: 'developerdurp/yml'
# file: # ref: 'main'
# - 'pipelines/go-build.yml' # file:
# strategy: depend # - 'jobs/version.yml'
# rules: # - 'jobs/gitlab.yml'
# - exists: #
# - "go.mod" #variables:
# PARENT_PIPELINE_ID: $CI_PIPELINE_ID
generate-config-staging: # GO_VERSION: "1.22"
extends: .generate-config # GOLANGCI_LINT_VERISON: "v1.58.0"
stage: staging # UPLOAD_PACKAGE: "false"
variables: # PROJECT_NAME: $CI_PROJECT_NAME
ENVIRONMENT: "staging" #
#version:
child-pipeline-staging: # extends: .version
stage: staging # stage: .pre
environment: #
name: "staging" # #build:
needs: # # stage: deploy
- job: generate-config-staging # # allow_failure: false
trigger: # # trigger:
include: # # include:
- artifact: generated-config.yml # # - project: 'developerdurp/yml'
job: generate-config-staging # # ref: 'main'
# # file:
generate-config-production: # # - 'pipelines/go-build.yml'
extends: .generate-config # # strategy: depend
stage: production # # rules:
when: manual # # - exists:
needs: # # - "go.mod"
- job: version #
artifacts: true #generate-config-staging:
- job: generate-config-staging # extends: .generate-config
- job: child-pipeline-staging # stage: staging
variables: # variables:
ENVIRONMENT: "production" # ENVIRONMENT: "staging"
#
child-pipeline-production: #child-pipeline-staging:
stage: production # stage: staging
environment: # needs:
name: "production" # - job: generate-config-staging
needs: # trigger:
- job: generate-config-production # include:
trigger: # - artifact: generated-config.yml
include: # job: generate-config-staging
- artifact: generated-config.yml #
job: generate-config-production #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: "production"
#
#child-pipeline-production:
# stage: production
# needs:
# - job: generate-config-production
# trigger:
# include:
# - artifact: generated-config.yml
# job: generate-config-production