Skip to content

Commit

Permalink
feat: Docker pull env driven (#5767)
Browse files Browse the repository at this point in the history
* useDockerApiToGetDigest menv driven flag to control pulling image either using docker pull or docker API

* UseAppDockerConfigForPrivateRegistries in workflow request

* revert

* revert
  • Loading branch information
prakash100198 authored Aug 30, 2024
1 parent ff89a26 commit 5170040
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions env_gen.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@
| USE_CASBIN_V2 | false | |
| USE_CUSTOM_HTTP_TRANSPORT | false | |
| USE_DEPLOYMENT_CONFIG_DATA | false | |
| USE_DOCKER_API_TO_GET_DIGEST | false | |
| USE_EXTERNAL_NODE | false | |
| USE_GIT_CLI | false | |
| USE_IMAGE_TAG_FROM_GIT_PROVIDER_FOR_TAG_BASED_BUILD | false | |
Expand Down
1 change: 1 addition & 0 deletions pkg/pipeline/CiService.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ func (impl *CiServiceImpl) buildWfRequestForCiPipeline(pipeline *pipelineConfig.
PluginArtifactStage: pluginArtifactStage,
ImageScanMaxRetries: impl.config.ImageScanMaxRetries,
ImageScanRetryDelay: impl.config.ImageScanRetryDelay,
UseDockerApiToGetDigest: impl.config.UseDockerApiToGetDigest,
}
if pipeline.App.AppType == helper.Job {
workflowRequest.AppName = pipeline.App.DisplayName
Expand Down
1 change: 1 addition & 0 deletions pkg/pipeline/types/CiCdConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ type CiCdConfig struct {
ExtBlobStorageSecretName string `env:"EXTERNAL_BLOB_STORAGE_SECRET_NAME" envDefault:"blob-storage-secret"`
UseArtifactListingQueryV2 bool `env:"USE_ARTIFACT_LISTING_QUERY_V2" envDefault:"true"`
UseImageTagFromGitProviderForTagBasedBuild bool `env:"USE_IMAGE_TAG_FROM_GIT_PROVIDER_FOR_TAG_BASED_BUILD" envDefault:"false"` // this is being done for https://github.com/devtron-labs/devtron/issues/4263
UseDockerApiToGetDigest bool `env:"USE_DOCKER_API_TO_GET_DIGEST" envDefault:"false"`
}

type CiConfig struct {
Expand Down
1 change: 1 addition & 0 deletions pkg/pipeline/types/Workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ type WorkflowRequest struct {
Scope resourceQualifiers.Scope
BuildxCacheModeMin bool `json:"buildxCacheModeMin"`
AsyncBuildxCacheExport bool `json:"asyncBuildxCacheExport"`
UseDockerApiToGetDigest bool `json:"useDockerApiToGetDigest"`
}

func (workflowRequest *WorkflowRequest) updateExternalRunMetadata() {
Expand Down

0 comments on commit 5170040

Please sign in to comment.