Skip to content

Commit 2886a01

Browse files
committed
fix: docker login is not executed for pre/post cd stage executions
1 parent 80bd805 commit 2886a01

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

ci-runner/helper/DockerHelper.go

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -167,21 +167,19 @@ func (impl *DockerHelperImpl) StartDockerDaemonAndDockerLogin(commonWorkflowRequ
167167
util.PrintFileContent(DOCKERD_OUTPUT_FILE_PATH)
168168
return err
169169
}
170-
if commonWorkflowRequest.CiBuildConfig != nil && !commonWorkflowRequest.CiBuildConfig.CiBuildType.IsSkipBuildType() {
171-
ciContext := cicxt.BuildCiContext(context.Background(), commonWorkflowRequest.EnableSecretMasking)
172-
err = impl.DockerLogin(ciContext, &DockerCredentials{
173-
DockerUsername: commonWorkflowRequest.DockerUsername,
174-
DockerPassword: commonWorkflowRequest.DockerPassword,
175-
AwsRegion: commonWorkflowRequest.AwsRegion,
176-
AccessKey: commonWorkflowRequest.AccessKey,
177-
SecretKey: commonWorkflowRequest.SecretKey,
178-
DockerRegistryURL: commonWorkflowRequest.IntermediateDockerRegistryUrl,
179-
DockerRegistryType: commonWorkflowRequest.DockerRegistryType,
180-
CredentialsType: commonWorkflowRequest.CredentialsType,
181-
})
182-
if err != nil {
183-
return err
184-
}
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+
CredentialsType: commonWorkflowRequest.CredentialsType,
180+
})
181+
if err != nil {
182+
return err
185183
}
186184

187185
return nil

0 commit comments

Comments
 (0)