Skip to content

Commit 191bc6a

Browse files
Merge pull request #17104 from deads2k/build-08-dep-snip
Automatic merge from submit-queue. remove bad builder dependencies This removes builder dependencies from origin code. @openshift/sig-master @bparees
2 parents 37c8c18 + 2e4fcd4 commit 191bc6a

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

hack/import-restrictions.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
],
2323
"ignoredSubTrees": [
2424
"github.com/openshift/origin/pkg/build/builder",
25-
"github.com/openshift/origin/pkg/cmd/infra/builder",
26-
"github.com/openshift/origin/pkg/oc/cli/secrets",
27-
"github.com/openshift/origin/pkg/build/controller/strategy"
25+
"github.com/openshift/origin/pkg/cmd/infra/builder"
2826
],
2927
"forbiddenImportPackageRoots": [
3028
"github.com/openshift/origin/pkg/build/builder"

pkg/build/controller/strategy/util.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"github.com/openshift/origin/pkg/api/apihelpers"
1717
buildapi "github.com/openshift/origin/pkg/build/apis/build"
1818
buildapiv1 "github.com/openshift/origin/pkg/build/apis/build/v1"
19-
"github.com/openshift/origin/pkg/build/builder/cmd/dockercfg"
2019
imageapi "github.com/openshift/origin/pkg/image/apis/image"
2120
"github.com/openshift/origin/pkg/version"
2221
)
@@ -159,15 +158,15 @@ func setupDockerSecrets(pod *v1.Pod, container *v1.Container, pushSecret, pullSe
159158
if pushSecret != nil {
160159
mountSecretVolume(pod, container, pushSecret.Name, DockerPushSecretMountPath, "push")
161160
container.Env = append(container.Env, []v1.EnvVar{
162-
{Name: dockercfg.PushAuthType, Value: DockerPushSecretMountPath},
161+
{Name: "PUSH_DOCKERCFG_PATH", Value: DockerPushSecretMountPath},
163162
}...)
164163
glog.V(3).Infof("%s will be used for docker push in %s", DockerPushSecretMountPath, pod.Name)
165164
}
166165

167166
if pullSecret != nil {
168167
mountSecretVolume(pod, container, pullSecret.Name, DockerPullSecretMountPath, "pull")
169168
container.Env = append(container.Env, []v1.EnvVar{
170-
{Name: dockercfg.PullAuthType, Value: DockerPullSecretMountPath},
169+
{Name: "PULL_DOCKERCFG_PATH", Value: DockerPullSecretMountPath},
171170
}...)
172171
glog.V(3).Infof("%s will be used for docker pull in %s", DockerPullSecretMountPath, pod.Name)
173172
}
@@ -179,7 +178,7 @@ func setupDockerSecrets(pod *v1.Pod, container *v1.Container, pushSecret, pullSe
179178
mountPath := filepath.Join(SourceImagePullSecretMountPath, strconv.Itoa(i))
180179
mountSecretVolume(pod, container, imageSource.PullSecret.Name, mountPath, fmt.Sprintf("%s%d", "source-image", i))
181180
container.Env = append(container.Env, []v1.EnvVar{
182-
{Name: fmt.Sprintf("%s%d", dockercfg.PullSourceAuthType, i), Value: mountPath},
181+
{Name: fmt.Sprintf("%s%d", "PULL_SOURCE_DOCKERCFG_PATH_", i), Value: mountPath},
183182
}...)
184183
glog.V(3).Infof("%s will be used for docker pull in %s", mountPath, pod.Name)
185184
}

pkg/oc/cli/secrets/subcommand.go

+5-6
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,22 @@ import (
77
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
88
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
99

10-
"github.com/openshift/origin/pkg/build/builder/cmd/scmauth"
1110
"github.com/openshift/origin/pkg/cmd/util/clientcmd"
1211
)
1312

1413
const SecretsRecommendedName = "secrets"
1514

1615
const (
1716
// SourceUsername is the key of the optional username for basic authentication subcommand
18-
SourceUsername = scmauth.UsernameSecret
17+
SourceUsername = "username"
1918
// SourcePassword is the key of the optional password or token for basic authentication subcommand
20-
SourcePassword = scmauth.PasswordSecret
19+
SourcePassword = "password"
2120
// SourceCertificate is the key of the optional certificate authority for basic authentication subcommand
22-
SourceCertificate = scmauth.CACertName
21+
SourceCertificate = "ca.crt"
2322
// SourcePrivateKey is the key of the required SSH private key for SSH authentication subcommand
24-
SourcePrivateKey = scmauth.SSHPrivateKeyMethodName
23+
SourcePrivateKey = "ssh-privatekey"
2524
// SourceGitconfig is the key of the optional gitconfig content for both basic and SSH authentication subcommands
26-
SourceGitConfig = scmauth.GitConfigName
25+
SourceGitConfig = ".gitconfig"
2726
)
2827

2928
var (

0 commit comments

Comments
 (0)