-
Notifications
You must be signed in to change notification settings - Fork 36
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 'Extract Task spec' CodeAction #546
Conversation
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Codecov Report
@@ Coverage Diff @@
## master #546 +/- ##
==========================================
+ Coverage 68.22% 68.64% +0.41%
==========================================
Files 97 97
Lines 5785 5874 +89
Branches 1019 1032 +13
==========================================
+ Hits 3947 4032 +85
- Misses 1838 1842 +4
Continue to review full report at Codecov.
|
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
const virtDoc = this.getDocForExtractedTask(name, type, action.taskSpecText); | ||
|
||
const saveError = await tektonVfsProvider.saveTektonDocument(virtDoc); | ||
if (saveError) { |
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 got error here error converting YAML to JSON: yaml: line 4: did not find expected key
virtDoc =
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: new-task
{}
spec:
resources:
inputs:
- name: pipeline-git
type: git
outputs:
- name: pipeline-git
type: git
steps:
- args:
- '-c'
- |
ls -al $(resources.inputs.pipeline-git.path)
command:
- bash
image: ubuntu
name: list
resources: {}
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.
Now it should work
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Fix: #511
Demo:
Screen.Recording.2021-04-06.at.16.17.16.mov