Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Spaces in Jenkins project name #178

Merged
merged 1 commit into from
Jul 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ public void setUp(Context context, Run<?, ?> build, FilePath workspace, Launcher
}

int status = launcher.launch()
.cmdAsSingleString("kubectl config --kubeconfig=" + configFile.getRemote()
+ " set-cluster k8s --server=" + serverUrl + tlsConfig)
.cmdAsSingleString("kubectl config --kubeconfig=\"" + configFile.getRemote()
+ "\" set-cluster k8s --server=" + serverUrl + tlsConfig)
.join();
if (status != 0) throw new IOException("Failed to run kubectl config "+status);

Expand Down Expand Up @@ -150,18 +150,18 @@ public void setUp(Context context, Run<?, ?> build, FilePath workspace, Launcher
}

status = launcher.launch()
.cmdAsSingleString("kubectl config --kubeconfig=" + configFile.getRemote() + " set-credentials cluster-admin " + login)
.cmdAsSingleString("kubectl config --kubeconfig=\"" + configFile.getRemote() + "\" set-credentials cluster-admin " + login)
.masks(false, false, false, false, false, false, true)
.join();
if (status != 0) throw new IOException("Failed to run kubectl config "+status);

status = launcher.launch()
.cmdAsSingleString("kubectl config --kubeconfig=" + configFile.getRemote() + " set-context k8s --cluster=k8s --user=cluster-admin")
.cmdAsSingleString("kubectl config --kubeconfig=\"" + configFile.getRemote() + "\" set-context k8s --cluster=k8s --user=cluster-admin")
.join();
if (status != 0) throw new IOException("Failed to run kubectl config "+status);

status = launcher.launch()
.cmdAsSingleString("kubectl config --kubeconfig=" + configFile.getRemote() + " use-context k8s")
.cmdAsSingleString("kubectl config --kubeconfig=\"" + configFile.getRemote() + "\" use-context k8s")
.join();
if (status != 0) throw new IOException("Failed to run kubectl config "+status);

Expand Down