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:
- echo $DATABASE_PASSWORD
#include: #include:
# - project: 'developerdurp/yml' # - project: 'developerdurp/yml'
# ref: 'main' # ref: 'main'
# file: # file:
# - 'pipelines/go-build.yml' # - 'jobs/version.yml'
# strategy: depend # - 'jobs/gitlab.yml'
# rules: #
# - exists: #variables:
# - "go.mod" # PARENT_PIPELINE_ID: $CI_PIPELINE_ID
# GO_VERSION: "1.22"
generate-config-staging: # GOLANGCI_LINT_VERISON: "v1.58.0"
extends: .generate-config # UPLOAD_PACKAGE: "false"
stage: staging # PROJECT_NAME: $CI_PROJECT_NAME
variables: #
ENVIRONMENT: "staging" #version:
# extends: .version
child-pipeline-staging: # stage: .pre
stage: staging #
environment: # #build:
name: "staging" # # stage: deploy
needs: # # allow_failure: false
- job: generate-config-staging # # trigger:
trigger: # # include:
include: # # - project: 'developerdurp/yml'
- artifact: generated-config.yml # # ref: 'main'
job: generate-config-staging # # file:
# # - 'pipelines/go-build.yml'
generate-config-production: # # strategy: depend
extends: .generate-config # # rules:
stage: production # # - exists:
when: manual # # - "go.mod"
needs: #
- job: version #generate-config-staging:
artifacts: true # extends: .generate-config
- job: generate-config-staging # stage: staging
- job: child-pipeline-staging # variables:
variables: # ENVIRONMENT: "staging"
ENVIRONMENT: "production" #
#child-pipeline-staging:
child-pipeline-production: # stage: staging
stage: production # needs:
environment: # - job: generate-config-staging
name: "production" # trigger:
needs: # include:
- job: generate-config-production # - artifact: generated-config.yml
trigger: # job: generate-config-staging
include: #
- artifact: generated-config.yml #generate-config-production:
job: 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