Skip to content

Commit 4bdf65c

Browse files
aledbfroboquat
authored andcommitted
Refactor previewctl
1 parent 78d6616 commit 4bdf65c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.werft/jobs/build/prepare.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function configureDocker() {
6161
}
6262

6363
function configureGlobalKubernetesContext() {
64-
const rc = exec(`previewctl get-credentials --gcp-service-account=${GCLOUD_SERVICE_ACCOUNT_PATH} --kube-save-path=${GLOBAL_KUBECONFIG_PATH}`, { slice: prepareSlices.CONFIGURE_K8S }).code;
64+
const rc = exec(`KUBECONFIG=${GLOBAL_KUBECONFIG_PATH} previewctl get-credentials --gcp-service-account=${GCLOUD_SERVICE_ACCOUNT_PATH}`, { slice: prepareSlices.CONFIGURE_K8S }).code;
6565

6666
if (rc != 0) {
6767
throw new Error("Failed to configure global kubernetes context.");

.werft/platform-delete-preview-environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ async function deletePreviewEnvironment() {
9494
}
9595

9696
function configureGlobalKubernetesContext() {
97-
const rc = exec(`previewctl get-credentials --gcp-service-account=${GCLOUD_SERVICE_ACCOUNT_PATH} --kube-save-path=${GLOBAL_KUBECONFIG_PATH}`, { slice: SLICES.CONFIGURE_K8S }).code;
97+
const rc = exec(`KUBECONFIG=${GLOBAL_KUBECONFIG_PATH} previewctl get-credentials --gcp-service-account=${GCLOUD_SERVICE_ACCOUNT_PATH}`, { slice: SLICES.CONFIGURE_K8S }).code;
9898

9999
if (rc != 0) {
100100
throw new Error("Failed to configure global kubernetes context.");

dev/preview/BUILD.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ scripts:
1515
- name: get-credentials
1616
description: Provisions a new preview environment
1717
script: |
18-
previewctl get-credentials --kube-save-path $HOME/.kube/config
18+
KUBECONFIG=$HOME/.kube/config previewctl get-credentials
1919
2020
- name: create-preview
2121
description: Provisions a new preview environment

0 commit comments

Comments
 (0)