From d843b072cbe716f8eb8d8bb9a15983f74865f8fb Mon Sep 17 00:00:00 2001 From: Shivam-nagar23 Date: Fri, 24 Nov 2023 13:56:40 +0530 Subject: [PATCH] git optional checkout --- ciStages.go | 2 +- helper/EventHelper.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ciStages.go b/ciStages.go index 78e0789c..8972c8f7 100644 --- a/ciStages.go +++ b/ciStages.go @@ -107,7 +107,7 @@ func runCIStages(ciCdRequest *helper.CiCdTriggerEvent) (artifactUploaded bool, e log.Println(util.DEVTRON, " git") ciBuildConfigBean := ciCdRequest.CommonWorkflowRequest.CiBuildConfig buildSkipEnabled := ciBuildConfigBean != nil && ciBuildConfigBean.CiBuildType == helper.BUILD_SKIP_BUILD_TYPE - skipCheckout := ciBuildConfigBean != nil && ciBuildConfigBean.PipelineType == helper.CI_JOB + skipCheckout := ciBuildConfigBean != nil && (ciBuildConfigBean.PipelineType == helper.CI_JOB && !ciCdRequest.CommonWorkflowRequest.IsGitRequired) if !skipCheckout { err = helper.CloneAndCheckout(ciCdRequest.CommonWorkflowRequest.CiProjectDetails) } diff --git a/helper/EventHelper.go b/helper/EventHelper.go index 9db54aa2..91b5e316 100644 --- a/helper/EventHelper.go +++ b/helper/EventHelper.go @@ -176,6 +176,7 @@ type CommonWorkflowRequest struct { RegistryCredentialMap map[string]RegistryCredentials `json:"registryCredentialMap"` PluginArtifactStage string `json:"pluginArtifactStage"` PushImageBeforePostCI bool `json:"pushImageBeforePostCI"` + IsGitRequired bool `json:"isGitRequired"` } func (c *CommonWorkflowRequest) GetCloudHelperBaseConfig(blobStorageObjectType string) *util.CloudHelperBaseConfig {