Skip to content

Commit 7367c85

Browse files
committed
fix: docker login is not executed for pre/post cd stage executions
1 parent 0f0a00d commit 7367c85

1 file changed

Lines changed: 12 additions & 14 deletions

File tree

ci-runner/helper/DockerHelper.go

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -166,20 +166,18 @@ func (impl *DockerHelperImpl) StartDockerDaemonAndDockerLogin(commonWorkflowRequ
166166
util.PrintFileContent(DOCKERD_OUTPUT_FILE_PATH)
167167
return err
168168
}
169-
if commonWorkflowRequest.CiBuildConfig != nil && !commonWorkflowRequest.CiBuildConfig.CiBuildType.IsSkipBuildType() {
170-
ciContext := cicxt.BuildCiContext(context.Background(), commonWorkflowRequest.EnableSecretMasking)
171-
err = impl.DockerLogin(ciContext, &DockerCredentials{
172-
DockerUsername: commonWorkflowRequest.DockerUsername,
173-
DockerPassword: commonWorkflowRequest.DockerPassword,
174-
AwsRegion: commonWorkflowRequest.AwsRegion,
175-
AccessKey: commonWorkflowRequest.AccessKey,
176-
SecretKey: commonWorkflowRequest.SecretKey,
177-
DockerRegistryURL: commonWorkflowRequest.IntermediateDockerRegistryUrl,
178-
DockerRegistryType: commonWorkflowRequest.DockerRegistryType,
179-
})
180-
if err != nil {
181-
return err
182-
}
169+
ciContext := cicxt.BuildCiContext(context.Background(), commonWorkflowRequest.EnableSecretMasking)
170+
err = impl.DockerLogin(ciContext, &DockerCredentials{
171+
DockerUsername: commonWorkflowRequest.DockerUsername,
172+
DockerPassword: commonWorkflowRequest.DockerPassword,
173+
AwsRegion: commonWorkflowRequest.AwsRegion,
174+
AccessKey: commonWorkflowRequest.AccessKey,
175+
SecretKey: commonWorkflowRequest.SecretKey,
176+
DockerRegistryURL: commonWorkflowRequest.IntermediateDockerRegistryUrl,
177+
DockerRegistryType: commonWorkflowRequest.DockerRegistryType,
178+
})
179+
if err != nil {
180+
return err
183181
}
184182

185183
return nil

0 commit comments

Comments
 (0)