Updates odo init output, fixes colorized output for tests. (#5613)

* Update vendoring for coloring to add NO_COLOR

* Updates odo init output / adds logo

<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Dev:-odo-Dev-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Dev:-Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/Pull-Requests:-Review-guideline

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Documentation:-Contributing
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->

/kind feature

**What does this PR do / why we need it:**

We have the logo appearing in `odo dev` and `odo deploy`

Those 3 commands are the most used with `odo`, and the ones that are
most used. All three should have similar and consistent output that
contains:
  * What the component is doing (first line)
  * What's detected (in odo init, it's the files, in odo deploy and dev
    it's the component name)
  * odo version that is being used / outputted.

```sh
$ odo init
  __
 /  \__     Initializing a new component
 \__/  \    Files: No source code detected, a starter project will be created in the current directory
 /  \__/    odo version: v2.5.0
 \__/

Interactive mode enabled, please answer the following questions:
? Select language: javascript
? Select project type: Next.js
 ✓  Downloading devfile "nodejs-nextjs" from registry "DefaultDevfileRegistry" [450ms]
? Which starter project do you want to use? nodejs-nextjs-starter
? Enter component name: my-nodejs-nextjs-app
 ✓  Downloading starter project "nodejs-nextjs-starter" [516ms]

Your new component 'my-nodejs-nextjs-app' is ready in the current directory.
To start editing your component, use 'odo dev' and open this folder in your favorite IDE.
Changes will be directly reflected on the cluster.
```

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

N/A

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**

N/A

Signed-off-by: Charlie Drage <charlie@charliedrage.com>

* Update based on reviews

Signed-off-by: Charlie Drage <charlie@charliedrage.com>

* Update based on review

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
This commit is contained in:
Charlie Drage
2022-04-12 09:41:45 -04:00
committed by GitHub
parent e4c55f8640
commit 9c491b16fe
24 changed files with 126 additions and 84 deletions

View File

@@ -13,6 +13,10 @@ PKGS := $(shell go list $(COMMON_GOFLAGS) ./... | grep -v $(PROJECT)/vendor | g
FILES := odo dist
TIMEOUT ?= 14400s
# We should NOT output any color when running interactive tests
# or else we may have issues with regards to comparing coloured output strings
NO_COLOR = true
# Env variable TEST_EXEC_NODES is used to pass spec execution type
# (parallel or sequential) for ginkgo tests. To run the specs sequentially use
# TEST_EXEC_NODES=1, otherwise by default the specs are run in parallel on 4 ginkgo test node if running on PSI cluster or 24 nodes if running on IBM Cloud cluster.