-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing Kubectl command for now (#36)
Signed-off-by: Ken Sipe <[email protected]>
- Loading branch information
Showing
10 changed files
with
103 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
# The following solution for making code generation work with go modules is | ||
# borrowed and modified from https://github.com/heptio/contour/pull/1010. | ||
# it has been modified to enable caching. | ||
export GO111MODULE=on | ||
version_and_repo=$(go list -f '{{if .Replace}}{{.Replace.Version}} {{.Replace.Path}}{{else}}{{.Version}} {{.Path}}{{end}}' -m k8s.io/code-generator) | ||
VERSION="$(echo "${version_and_repo}" | cut -d' ' -f 1 | rev | cut -d"-" -f1 | rev)" | ||
CODEGEN_REPO="$(echo "${version_and_repo}" | cut -d' ' -f 2)" | ||
REPO_ROOT="${REPO_ROOT:-$(git rev-parse --show-toplevel)}" | ||
CODE_GEN_DIR="${REPO_ROOT}/hack/code-gen/$VERSION" | ||
|
||
if [[ -d ${CODE_GEN_DIR} ]]; then | ||
echo "Using cached code generator version: $VERSION" | ||
else | ||
echo "Cloning code-generator from ${CODEGEN_REPO}" | ||
git clone https://${CODEGEN_REPO}.git "${CODE_GEN_DIR}" | ||
git -C "${CODE_GEN_DIR}" reset --hard "${VERSION}" | ||
fi | ||
|
||
# Fake being in a $GOPATH until kubernetes fully supports modules | ||
# https://github.com/kudobuilder/kudo/issues/1252 | ||
FAKE_GOPATH="$(mktemp -d)" | ||
trap 'chmod -R u+rwX ${FAKE_GOPATH} && rm -rf ${FAKE_GOPATH}' EXIT | ||
FAKE_REPOPATH="${FAKE_GOPATH}/src/github.com/kudobuilder/kuttl" | ||
mkdir -p "$(dirname "${FAKE_REPOPATH}")" && ln -s "${REPO_ROOT}" "${FAKE_REPOPATH}" | ||
export GOPATH="${FAKE_GOPATH}" | ||
cd "${FAKE_REPOPATH}" | ||
|
||
"${CODE_GEN_DIR}"/generate-groups.sh \ | ||
deepcopy \ | ||
github.com/kudobuilder/kuttl/pkg/client \ | ||
github.com/kudobuilder/kuttl/pkg/apis \ | ||
"testharness:v1beta1" \ | ||
--go-header-file hack/boilerplate.go.txt # must be last for some reason |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
kind: TestStep | ||
kubectl: | ||
- apply -f ./test_data/pod.yaml | ||
commands: | ||
- command: kubectl apply -f ./test_data/pod.yaml | ||
namespaced: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters