0

Why does Tekton turn this:

                - |
                  npm install playwright

                  mkdir tests

                  echo "import { test, expect } from '@playwright/test'" >> tests/chat.spec.js;
                  echo "" >> tests/chat.spec.js;
                  echo "test('Chat only for logged in users', async ({ page }) => {" >> tests/chat.spec.js;

into this?

                - >
                  npm install playwright


                  mkdir tests


                  echo "import { test, expect } from '@playwright/test'" >>
                  tests/chat.spec.js;

                  echo "" >> tests/chat.spec.js;

                  echo "test('Chat only for logged in users', async ({ page })
                  => {" >> tests/chat.spec.js;

And how to stop it from wrapping my command lines?

Cees Timmerman
  • 17,623
  • 11
  • 91
  • 124
  • It's not tekon. It's your YAML syntax. `>` is the folding quote operator ("folding" meaning "combine everything into a single line"); if you want to preserve newlines use the `|` block literal quote operator. See [this website](https://yaml-multiline.info/) for more information on this topic. – larsks Jul 23 '23 at 22:28
  • I tried `|` but that gets turned into `>` on save. – Cees Timmerman Jul 23 '23 at 22:37
  • What is transforming your document when you save it? Can you just edit your manifests with a text editor and submit them using `kubectl apply`? – larsks Jul 23 '23 at 22:44
  • I'm using the OpenShift Console. I have `kubectl` installed on my MacBook but don't know if that would work on the remote server. – Cees Timmerman Jul 23 '23 at 22:50
  • Of course it works with a remote server; that's it's primary purpose (interacting with a remote Kubernetes API). – larsks Jul 23 '23 at 23:40

0 Answers0