-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only have one set of examples and test that they are valid
We ended up in a state where we had both an `examples` dir and a `samples` dir, and neither were tested, so both were slightly out of sync with each other and the actual types. This was b/c: - When we used kubebuilder, we generated our types from an original set of examples - previously these were in `config/samples` and they ended up in `samples`. We used the validation tests generated by kubebuilder to test these, but when we removed kubebuilder we removed the tests - Before presenting the API to the Build CRD working group, we wanted to have some more complex, real world examples, which @tejal29 created from the `kritis` project and the k8s guestbook example This commit makes sure that all of the functionality demonstrated in `samples` is in `examples`, and removes `samples`. This included: - Fixing `passedConstraints` to be plural as the types expected - Including references to the `PipelineParams` in the `TaskRun` example (removing the duplicated list of result endpoints, since we'll be getting this from the references instead) - Fixing clusterBindings to refer to the actual names of the clusters involved It also adds a step to the integration tests to deploy the examples, which will fail if they do not match the expected schema. At this point they are torn down immediately after creation, but in #108 we can expand this to actually test that they are working. Also had to make some tweaks to the types: - actually including `ClusterBindings` in the `Pipeline` - Using names which include `Resource` instead of `Source`, which we moved away from in #39 Fixes #20
- Loading branch information
1 parent
dcc2cb1
commit 9031ed4
Showing
22 changed files
with
129 additions
and
335 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
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
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,35 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 The Knative Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# smoke_test.sh will attempt to deploy all of the example CRDs to whatever | ||
# is the current kubectl cluster context. | ||
# It will not wait for any Runs to complete and instead will destroy the CRDs | ||
# immediately after creation, so at the moment this pretty much just makes | ||
# sure the structure is valid (and this might even have weird side effects..). | ||
|
||
set -o xtrace | ||
set -o errexit | ||
set -o pipefail | ||
|
||
kubectl apply -f examples/ | ||
kubectl apply -f examples/pipelines | ||
kubectl apply -f examples/invocations | ||
|
||
sleep 5 | ||
|
||
kubectl delete -f examples/invocations | ||
kubectl delete -f examples/pipelines | ||
kubectl delete -f examples/ |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.