Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce embedded
BuildSpec
for BuildRun
s
Make `BuildRef` optional and generate CRDs and fix all occurrences. Introduce code in `GetBuildObject` to support both the `BuildRef` approach and the new `BuildSpec` option. Return a transient in-memory Build resource in case the BuildRun has an embedded BuildSpec. Add optional `BuildSpec` in BuildRun spec. Add E2E test cases for embedded builds in buildruns. Add new BuildRun validation option in docs. Remove variable name for `context` to make it undefined (linter warning). Add empty lines for readability. Sort imports based on common kube/others order. Replace copy/paste description with specific one for bundle tests. Add `Expect`s to give human readable error in case test environment variables are not set. Remove duplicate import of `k8s.io/api/core/v1`. Simplify code by removing the `if` check. Fix warning that variable declaration could shadow previous variable value by refactoring the respective `if` block. Add or remove empty lines in `buildrun_test.go` to increase readability and to keep the same style as in other test cases. Refactor code to fix variable value shadow warning. Replace generic `errors.New("not found")` with Kube specific one. Introduce empty status call stub (not not fail in status update case). Refactor return statement to be more simple. Introduce `BuildSpec` in BuildRun spec Refactor build reconciler logic by inlining `UpdateBuildStatusAndRetreat` function that is only used once. Add test case to cover special case for build resource not being in the system. Refactor validation code by moving out validation list into a global variable. Add convenience function to get the name of the referenced build. Use `resources.GetBuildObject` instead of manual look-up in test cases. Introduce controller-runtime Kubernetes client in test handle. Add functions to create the validation structs in a consistent way. Add convenience function to validate a Build with validation varargs. Introduce validation code for field permutations. Add test cases for field validation. Fix markdown linter warnings and indention.
- Loading branch information