-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add export option for pipelinerun #1500
Conversation
The following is the coverage report on the affected files.
|
d6517eb
to
84a682a
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
802d2c2
to
a22fb9c
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
Suggested edit: diff --git a/pkg/cmd/pipelinerun/export.go b/pkg/cmd/pipelinerun/export.go
--- pkg/cmd/pipelinerun/export.go
+++ pkg/cmd/pipelinerun/export.go
@@ -1,4 +1,18 @@
+// Copyright © 2022 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.
+
package pipelinerun
import (
"io"
diff --git a/pkg/export/export.go b/pkg/export/export.go
--- pkg/export/export.go
+++ pkg/export/export.go
@@ -1,4 +1,18 @@
+// Copyright © 2022 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.
+
package export
import (
"fmt"
diff --git a/pkg/export/export_test.go b/pkg/export/export_test.go
--- pkg/export/export_test.go
+++ pkg/export/export_test.go
@@ -1,4 +1,18 @@
+// Copyright © 2022 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.
+
package export
import (
"testing"
|
The following is the coverage report on the affected files.
|
data, err := yaml.Marshal(p) | ||
return pipelineExportRemoveExtraFields(string(data)), err | ||
func TektonResourceToYaml(p interface{}) (string, error) { | ||
// I gave up trying to do a generic function.... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can optimize it in upcoming iterations.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am not sure how to optimize tho 😅
if someone has any ideas how to streamline it i'll be happy to take it.
add export option for pruns, same as pipeline. do the export function a bit more generic so we can feed any tekton type we want. Use generateName instead of name when there is one When there is a generateName and a name, use the generateName and unset the name since that's what we want on export. Signed-off-by: Chmouel Boudjnah <[email protected]>
e9d78a5
to
1ffb8ef
Compare
The following is the coverage report on the affected files.
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: piyush-garg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
looks good
#1498 | [Pradeep Kumar] update tkn v0.22.0 | 2022/02/01-22:04 #1499 | [Daniel Helfand] update tkn chocolatey package to v0.22.0 | 2022/02/02-10:17 #1503 | [Chmouel Boudjnah] Use ubuntu-rolling to build package | 2022/02/03-10:17 #1505 | [Shubham] Make `vendor` a PHONY target | 2022/02/07-10:50 #1500 | [Chmouel Boudjnah] Add export option for pipelinerun | 2022/02/15-12:01 #1484 | [mansi103] Checked existence of resources before deletion | 2022/02/16-13:46 #1513 | [tomonight] pass rest config when create tkn clients,fix the default QPS is to low(QPS is 5),can improve the concurrent | 2022/02/28-09:14 #1514 | [Piyush Garg] Bump deps of pipeline and triggers | 2022/02/28-13:53 #1509 | [mansi103] Adds chains version in output of tkn version command | 2022/03/01-12:52 #1440 | [Rémy Greinhofer] Add Chains management command | 2022/03/03-15:01 null | [Vincent Demeester] Fix vendoring | 2022/03/03-15:01 null | [Vincent Demeester] Temporary disable linting tarball package | 2022/03/03-15:01 null | [jbpratt] remove unnecessary filepath join | 2022/03/04-08:13 null | [jbpratt] gofmt -w test/e2e/* | 2022/03/04-08:27 null | [jbpratt] replace t.Errorf %w with %v | 2022/03/04-09:17 null | [PuneetPunamiya] Bump Tekton Hub CLI to latest | 2022/03/04-10:37 null | [Pradeep Kumar] fix missing Cursor with interactive start commands | 2022/03/04-12:13 null | [Chmouel Boudjnah] Fix tektoncd docs installation instructions | 2022/03/08-08:08 null | [Piyush Garg] Make chains namespace configurable | 2022/03/09-09:29 null | [Piyush Garg] Bump chains and hub deps | 2022/03/09-09:29 Signed-off-by: Piyush Garg <[email protected]>
add export option for pruns, same as pipeline. do the export function a
bit more generic so we can feed any tekton type we want.
Add another fix to use generateName and remove the name when the two of them are there.
Signed-off-by: Chmouel Boudjnah [email protected]
Changes
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make check
make generated
See the contribution guide
for more details.
Release Notes