From 5755e35ac1159566ec07e0b2b8c1f49ad40fb115 Mon Sep 17 00:00:00 2001 From: DeveloperDurp Date: Mon, 27 May 2024 08:41:36 -0500 Subject: [PATCH] update --- .gitlab/.gitlab-ci.yml | 143 ++++++++++++++++++----------------------- 1 file changed, 63 insertions(+), 80 deletions(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index 5ea1df5..e5fbd65 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -3,88 +3,71 @@ stages: - staging - production +include: + - project: "developerdurp/yml" + ref: "main" + file: + - "jobs/version.yml" + - "jobs/gitlab.yml" + variables: - VAULT_SERVER_URL: https://vault.internal.durp.info - VAULT_AUTH_ROLE: gitlab - VAULT_AUTH_PATH: jwt + PARENT_PIPELINE_ID: $CI_PIPELINE_ID + GO_VERSION: "1.22" + GOLANGCI_LINT_VERISON: "v1.58.0" + UPLOAD_PACKAGE: "false" + PROJECT_NAME: $CI_PROJECT_NAME -test: - stage: deploy - image: registry.internal.durp.info/debian:latest - script: - - echo $test - - echo $VAULT_ID_TOKEN - id_tokens: - VAULT_ID_TOKEN: - aud: https://vault.internal.durp.info - secrets: - test: - vault: gitlab-ci/test@secrets +version: + extends: .version + stage: + .pre - #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 - # - #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: "staging" - # - #child-pipeline-staging: - # stage: staging - # needs: - # - job: generate-config-staging + #build: + # stage: deploy + # allow_failure: false # trigger: # include: - # - artifact: generated-config.yml - # job: generate-config-staging - # - #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 + # - 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: "staging" + +child-pipeline-staging: + stage: staging + needs: + - job: generate-config-staging + trigger: + include: + - artifact: generated-config.yml + job: generate-config-staging + +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