Skip to content

Commit

Permalink
Generate Tekton Pipeline Python SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchihe committed Aug 13, 2020
1 parent 8f58604 commit f2cb570
Show file tree
Hide file tree
Showing 6 changed files with 3,802 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ generated: | vendor ; $(info $(M) update generated files) ## Update generated fi
vendor:
$Q ./hack/update-deps.sh

.PHONY: vendor
vendor:
$Q ./hack/update-openapigen.sh

## Tests
TEST_UNIT_TARGETS := test-unit-verbose test-unit-race
test-unit-verbose: ARGS=-v
Expand Down
1 change: 1 addition & 0 deletions hack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Tekton Pipelines.
- [`update-codegen.sh`](./update-codegen.sh): Updates auto-generated client
libraries.
- [`update-deps.sh`](./update-deps.sh): Updates Go dependencies.
- [`update-openapigen.sh`](./update-openapigen.sh): Updates OpenAPI specification.
- [`verify-codegen.sh`](./verify-codegen.sh): Verifies that auto-generated
client libraries are up-to-date.
- Release docs have been moved to [the top-level `tekton` dir](../tekton)
25 changes: 25 additions & 0 deletions hack/update-openapigen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

# Copyright 2020 The Tekton 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.

set -o errexit
set -o nounset

echo "Generating OpenAPI specification ..."
go run k8s.io/kube-openapi/cmd/openapi-gen \
--input-dirs ./pkg/apis/pipeline/v1beta1,./pkg/apis/pipeline/pod,./pkg/apis/resource/v1alpha1,knative.dev/pkg/apis,knative.dev/pkg/apis/duck/v1beta1 \
--output-package ./pkg/apis/pipeline/v1beta1 -o ./ -v 5 \
--go-header-file hack/boilerplate/boilerplate.go.txt \

1 change: 1 addition & 0 deletions pkg/apis/pipeline/pod/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// +k8s:openapi-gen=true
package pod
3 changes: 3 additions & 0 deletions pkg/apis/pipeline/pod/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (

// PodTemplate holds pod specific configuration
// +k8s:deepcopy-gen=true
// +k8s:openapi-gen=true
type Template struct {
// NodeSelector is a selector which must be true for the pod to fit on a node.
// Selector which must match a node's labels for the pod to be scheduled on that node.
Expand All @@ -47,6 +48,8 @@ type Template struct {
// List of volumes that can be mounted by containers belonging to the pod.
// More info: https://kubernetes.io/docs/concepts/storage/volumes
// +optional
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
Volumes []corev1.Volume `json:"volumes,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"`

// RuntimeClassName refers to a RuntimeClass object in the node.k8s.io
Expand Down
Loading

0 comments on commit f2cb570

Please sign in to comment.