Skip to content

Commit

Permalink
Merge pull request #1933 from ConnorJC3/papercuts
Browse files Browse the repository at this point in the history
Fix Three Papercuts
  • Loading branch information
k8s-ci-robot authored Feb 15, 2024
2 parents a894a85 + 70de213 commit efded5e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ update/gomod:

.PHONY: update/shfmt
update/shfmt: bin/shfmt
./bin/shfmt -w -i 2 -d .
./bin/shfmt -w -i 2 -d ./hack/

## Verifiers
# Linters and similar
Expand Down
4 changes: 2 additions & 2 deletions hack/e2e/kops/kops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function kops_patch_cluster_file() {
jq "$FILTER" "$CLUSTER_FILE_JSON" >"$CLUSTER_FILE_0"

# Patch only the json objects
kubectl patch -f "$CLUSTER_FILE_0" --local --type merge --patch "$(cat "$KOPS_PATCH_FILE")" -o json >"$CLUSTER_FILE_1"
kubectl patch --kubeconfig /dev/null -f "$CLUSTER_FILE_0" --local --type merge --patch "$(cat "$KOPS_PATCH_FILE")" -o json >"$CLUSTER_FILE_1"
mv "$CLUSTER_FILE_1" "$CLUSTER_FILE_0"

# Delete the original json objects, add the patched
Expand All @@ -141,7 +141,7 @@ function kops_patch_cluster_file() {
function yaml_to_json() {
IN=${1}
OUT=${2}
kubectl patch -f "$IN" --local -p "{}" --type merge -o json | jq '.' -s >"$OUT"
kubectl patch --kubeconfig /dev/null -f "$IN" --local -p "{}" --type merge -o json | jq '.' -s >"$OUT"
}

function json_to_yaml() {
Expand Down
9 changes: 6 additions & 3 deletions hack/prow-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ export KOPS_BUCKET=${KOPS_BUCKET:-"k8s-kops-csi-shared-e2e"}
# Always use us-west-2 in CI, no matter where the local client is
export AWS_REGION=us-west-2

make cluster/create || exit 1
make e2e/${TEST}
E2E_PASSED=$?
if make cluster/create; then
make e2e/${TEST}
E2E_PASSED=$?
else
E2E_PASSED=1
fi
make cluster/delete

echo "E2E_PASSED: ${E2E_PASSED}"
Expand Down

0 comments on commit efded5e

Please sign in to comment.