summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@gitlab.com>2019-08-08 16:19:55 +0000
committerTomasz Maczukin <tomasz@gitlab.com>2019-08-08 16:19:55 +0000
commitfc6f2571a67f937b7bcd7650e6ff9f7173879006 (patch)
tree118b4e482f972538991b3f41c6b29bc0671f2c89
parentMerge branch 'docs-fix-link' into 'master' (diff)
parentauthConfigs can not be nil because it is created using make above. (diff)
downloadgitlab-runner-master.tar.gz
Merge branch 'suspicious-condition' into 'master'HEADmaster
Removal of conditions which are always evaluated either to true or false See merge request gitlab-org/gitlab-runner!1517
-rw-r--r--common/build.go6
-rw-r--r--executors/docker/executor_docker.go4
2 files changed, 2 insertions, 8 deletions
diff --git a/common/build.go b/common/build.go
index fa11ef1b..14ddb467 100644
--- a/common/build.go
+++ b/common/build.go
@@ -389,10 +389,8 @@ func (b *Build) retryCreateExecutor(options ExecutorPrepareOptions, provider Exe
if err == nil {
break
}
- if executor != nil {
- executor.Cleanup()
- executor = nil
- }
+ executor.Cleanup()
+ executor = nil
if _, ok := err.(*BuildError); ok {
break
} else if options.Context.Err() != nil {
diff --git a/executors/docker/executor_docker.go b/executors/docker/executor_docker.go
index 12b83721..ecce4d40 100644
--- a/executors/docker/executor_docker.go
+++ b/executors/docker/executor_docker.go
@@ -128,10 +128,6 @@ func (e *executor) getBuildAuthConfiguration(indexName string) (string, *types.A
}
}
- if authConfigs == nil {
- return "", nil
- }
-
return AuthConfigSourceNameJobPayload, docker_helpers.ResolveDockerAuthConfig(indexName, authConfigs)
}