Skip to content

Commit 3074d15

Browse files
authored
Merge pull request #248 from devtron-labs/fix-docker-login-cd-stage-main
fix: docker login is not executed for pre/post cd stage executions
2 parents 80bd805 + 4ed7b7c commit 3074d15

22 files changed

Lines changed: 48 additions & 50 deletions

File tree

chart-sync/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.22.4
55
toolchain go1.22.6
66

77
replace (
8-
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c
8+
github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079
99
helm.sh/helm/v3 v3.14.3 => github.com/devtron-labs/helm/v3 v3.14.1-0.20240401080259-90238cf69e42
1010
)
1111

chart-sync/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr
5454
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5555
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
5656
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
57-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c h1:lIIGAMWM4UwSwrd5Ljm1x4vtNRm1s0q2mTqdQWX8L6Q=
58-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c/go.mod h1:zkNShlkcHxsmnL0gKNbs0uyRL8lZonGKr5Km63uTLI0=
57+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079 h1:1xrbGSS3IjRO+qJqh5R1i/vWGthD1/diVtUfAESjRJ8=
58+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079/go.mod h1:zkNShlkcHxsmnL0gKNbs0uyRL8lZonGKr5Km63uTLI0=
5959
github.com/devtron-labs/helm/v3 v3.14.1-0.20240401080259-90238cf69e42 h1:pJmK44QaSztOiZe0iQHNf0sdy5KwkAeceydyhOG4RaY=
6060
github.com/devtron-labs/helm/v3 v3.14.1-0.20240401080259-90238cf69e42/go.mod h1:v6myVbyseSBJTzhmeE39UcPLNv6cQK6qss3dvgAySaE=
6161
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=

chart-sync/vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ github.com/containerd/platforms
9393
# github.com/davecgh/go-spew v1.1.1
9494
## explicit
9595
github.com/davecgh/go-spew/spew
96-
# github.com/devtron-labs/common-lib v0.0.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c
96+
# github.com/devtron-labs/common-lib v0.0.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079
9797
## explicit; go 1.21
9898
github.com/devtron-labs/common-lib/constants
9999
github.com/devtron-labs/common-lib/fetchAllEnv
@@ -791,4 +791,4 @@ sigs.k8s.io/structured-merge-diff/v4/value
791791
# sigs.k8s.io/yaml v1.3.0
792792
## explicit; go 1.12
793793
sigs.k8s.io/yaml
794-
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c
794+
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079

ci-runner/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.21
44

55
toolchain go1.21.8
66

7-
replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c
7+
replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079
88

99
require (
1010
github.com/Knetic/govaluate v3.0.0+incompatible

ci-runner/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
9595
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
9696
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
9797
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
98-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c h1:lIIGAMWM4UwSwrd5Ljm1x4vtNRm1s0q2mTqdQWX8L6Q=
99-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c/go.mod h1:zkNShlkcHxsmnL0gKNbs0uyRL8lZonGKr5Km63uTLI0=
98+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079 h1:1xrbGSS3IjRO+qJqh5R1i/vWGthD1/diVtUfAESjRJ8=
99+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079/go.mod h1:zkNShlkcHxsmnL0gKNbs0uyRL8lZonGKr5Km63uTLI0=
100100
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
101101
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
102102
github.com/docker/cli v24.0.6+incompatible h1:fF+XCQCgJjjQNIMjzaSmiKJSCcfcXb3TWTcc7GAneOY=

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

ci-runner/vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ github.com/cespare/xxhash/v2
248248
# github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
249249
## explicit
250250
github.com/davecgh/go-spew/spew
251-
# github.com/devtron-labs/common-lib v0.19.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c
251+
# github.com/devtron-labs/common-lib v0.19.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079
252252
## explicit; go 1.21
253253
github.com/devtron-labs/common-lib/blob-storage
254254
github.com/devtron-labs/common-lib/constants
@@ -991,4 +991,4 @@ sigs.k8s.io/structured-merge-diff/v4/value
991991
# sigs.k8s.io/yaml v1.3.0
992992
## explicit; go 1.12
993993
sigs.k8s.io/yaml
994-
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c
994+
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079

git-sensor/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.21
44

55
toolchain go1.22.4
66

7-
replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c
7+
replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079
88

99
require (
1010
github.com/caarlos0/env v3.5.0+incompatible

git-sensor/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ github.com/cyphar/filepath-securejoin v0.3.6/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGL
2727
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2828
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
2929
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
30-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c h1:lIIGAMWM4UwSwrd5Ljm1x4vtNRm1s0q2mTqdQWX8L6Q=
31-
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c/go.mod h1:zkNShlkcHxsmnL0gKNbs0uyRL8lZonGKr5Km63uTLI0=
30+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079 h1:1xrbGSS3IjRO+qJqh5R1i/vWGthD1/diVtUfAESjRJ8=
31+
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079/go.mod h1:zkNShlkcHxsmnL0gKNbs0uyRL8lZonGKr5Km63uTLI0=
3232
github.com/devtron-labs/protos v0.0.3-0.20250323220609-ecf8a0f7305e h1:U6UdYbW8a7xn5IzFPd8cywjVVPfutGJCudjePAfL/Hs=
3333
github.com/devtron-labs/protos v0.0.3-0.20250323220609-ecf8a0f7305e/go.mod h1:1TqULGlTey+VNhAu/ag7NJuUvByJemkqodsc9L5PHJk=
3434
github.com/docker/cli v24.0.6+incompatible h1:fF+XCQCgJjjQNIMjzaSmiKJSCcfcXb3TWTcc7GAneOY=

git-sensor/vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ github.com/cyphar/filepath-securejoin
6666
# github.com/davecgh/go-spew v1.1.1
6767
## explicit
6868
github.com/davecgh/go-spew/spew
69-
# github.com/devtron-labs/common-lib v0.0.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c
69+
# github.com/devtron-labs/common-lib v0.0.0 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079
7070
## explicit; go 1.21
7171
github.com/devtron-labs/common-lib/constants
7272
github.com/devtron-labs/common-lib/fetchAllEnv
@@ -488,4 +488,4 @@ gopkg.in/yaml.v3
488488
# mellium.im/sasl v0.3.2
489489
## explicit; go 1.20
490490
mellium.im/sasl
491-
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250425083942-5092ec30954c
491+
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20250430090539-2886a01f3079

0 commit comments

Comments
 (0)