From ee067fe829dcebddd16acae3a55ef05a150bf9ac Mon Sep 17 00:00:00 2001 From: Nathan Bockisch <nbockisc@nrao.edu> Date: Thu, 14 Apr 2022 14:48:16 -0600 Subject: [PATCH] Added yaml and sh scripts to build go modules via CI --- .gitlab-ci.yml | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f88bc1784..ca818b6ab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,17 +1,17 @@ stages: - - build-base - - push-base - - cache-build - - build - - unit-test - - test-coverage - - push - - deploy-coverage-page + # - build-base + # - push-base + # - cache-build + # - build + # - unit-test + # - test-coverage + # - push + # - deploy-coverage-page - generate-yaml - trigger - - deploy - - e2e-test - - .post + # - deploy + # - e2e-test + # - .post variables: # Gitlab optimization https://docs.gitlab.com/ee/ci/large_repositories/ @@ -339,9 +339,12 @@ go generate yaml: script: - DEPLOY_ENV=${DEPLOY_ENV} ./ci/bin/generate-go-yaml.py rules: + - if: $CI_MERGE_REQUEST_ID + changes: + - apps/cli/executables/go/**/* - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH changes: - - apps/cli/executables/pexable/**/* + - apps/cli/executables/go/**/* - if: '$CI_COMMIT_TAG =~ /^end-of-sprint-[0-9]+/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+/' variables: # override DEPLOY_ENV @@ -351,7 +354,7 @@ go generate yaml: DEPLOY_ENV: "prod" artifacts: paths: - - generated-pex-build-pipeline.yml + - generated-go-build-pipeline.yml # Trigger child pipeline based on generated go builder yaml go child pipeline: @@ -362,6 +365,9 @@ go child pipeline: job: go generate yaml strategy: depend rules: + - if: $CI_MERGE_REQUEST_ID + changes: + - apps/cli/executables/go/**/* - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH changes: - apps/cli/executables/go/**/* -- GitLab