mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
Run Docs tests on CI/CD (#6521)
* Run Docs tests on CI/CD * Remove warnings from test output * Replace version in mdx files
This commit is contained in:
22
.ibm/pipelines/kubernetes-docs-tests.sh
Executable file
22
.ibm/pipelines/kubernetes-docs-tests.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
LOGFILE="pr-${GIT_PR_NUMBER}-kubernetes-docs-tests-${BUILD_NUMBER}"
|
||||
|
||||
source .ibm/pipelines/functions.sh
|
||||
|
||||
ibmcloud login --apikey "${API_KEY_QE}"
|
||||
ibmcloud target -r "${IBM_REGION}"
|
||||
ibmcloud ks cluster config --cluster "${IBM_KUBERNETES_ID}" --admin
|
||||
|
||||
cleanup_namespaces
|
||||
(
|
||||
set -e
|
||||
make install
|
||||
make test-doc-automation
|
||||
) |& tee "/tmp/${LOGFILE}"
|
||||
|
||||
RESULT=${PIPESTATUS[0]}
|
||||
|
||||
save_logs "${LOGFILE}" "Kubernetes Docs Tests" ${RESULT}
|
||||
|
||||
exit ${RESULT}
|
||||
2
Makefile
2
Makefile
@@ -227,4 +227,4 @@ test-e2e:
|
||||
|
||||
.PHONY: test-doc-automation
|
||||
test-doc-automation:
|
||||
$(RUN_GINKGO) $(GINKGO_FLAGS) --junit-report="test-doc-automation.xml" tests/documentation/...
|
||||
$(RUN_GINKGO) $(GINKGO_FLAGS_ONE) --junit-report="test-doc-automation.xml" tests/documentation/...
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo init --devfile nodejs-react --name my-nr-app
|
||||
__
|
||||
/ \__ Initializing a new component
|
||||
\__/ \
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
✓ Downloading devfile "nodejs-react" [3s]
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo init --name my-spring-app --devfile java-springboot --devfile-registry Def
|
||||
__
|
||||
/ \__ Initializing a new component
|
||||
\__/ \
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
✓ Downloading devfile "java-springboot" from registry "DefaultDevfileRegistry" [4s]
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo init --devfile-path https://registry.devfile.io/devfiles/nodejs-angular --
|
||||
__
|
||||
/ \__ Initializing a new component
|
||||
\__/ \
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
✓ Downloading devfile from "https://registry.devfile.io/devfiles/nodejs-angular" [1s]
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo init
|
||||
__
|
||||
/ \__ Initializing a new component
|
||||
\__/ \ Files: Source code detected, a Devfile will be determined based upon source code autodetection
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
Interactive mode enabled, please answer the following questions:
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo init
|
||||
__
|
||||
/ \__ Initializing a new component
|
||||
\__/ \ Files: No source code detected, a starter project will be created in the current directory
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
Interactive mode enabled, please answer the following questions:
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo init --devfile go --name my-go-app --devfile-version latest
|
||||
__
|
||||
/ \__ Initializing a new component
|
||||
\__/ \
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
✓ Downloading devfile "go:latest" [4s]
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo init --devfile go --name my-go-app --devfile-version 2.0.0
|
||||
__
|
||||
/ \__ Initializing a new component
|
||||
\__/ \
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
✓ Downloading devfile "go:2.0.0" [3s]
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo deploy
|
||||
__
|
||||
/ \__ Deploying the application using my-dotnet-app Devfile
|
||||
\__/ \ Namespace: odo-dev
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
↪ Building & Pushing Container: quay.io/MYUSERNAME/dotnet-odo-example
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo deploy
|
||||
__
|
||||
/ \__ Deploying the application using my-go-app Devfile
|
||||
\__/ \ Namespace: odo-dev
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
↪ Building & Pushing Container: quay.io/MYUSERNAME/go-odo-example
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo deploy
|
||||
__
|
||||
/ \__ Deploying the application using my-java-app Devfile
|
||||
\__/ \ Namespace: odo-dev
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
↪ Building & Pushing Container: quay.io/MYUSERNAME/java-odo-example
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo deploy
|
||||
__
|
||||
/ \__ Deploying the application using my-nodejs-app Devfile
|
||||
\__/ \ Namespace: odo-dev
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
↪ Building & Pushing Container: quay.io/MYUSERNAME/nodejs-odo-example
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo dev
|
||||
__
|
||||
/ \__ Developing using the "my-dotnet-app" Devfile
|
||||
\__/ \ Namespace: odo-dev
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
↪ Running on the cluster in Dev mode
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo init
|
||||
__
|
||||
/ \__ Initializing a new component
|
||||
\__/ \ Files: Source code detected, a Devfile will be determined based upon source code autodetection
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
Interactive mode enabled, please answer the following questions:
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo dev
|
||||
__
|
||||
/ \__ Developing using the "my-go-app" Devfile
|
||||
\__/ \ Namespace: odo-dev
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
↪ Running on the cluster in Dev mode
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo init
|
||||
__
|
||||
/ \__ Initializing a new component
|
||||
\__/ \ Files: Source code detected, a Devfile will be determined based upon source code autodetection
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
Interactive mode enabled, please answer the following questions:
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo dev
|
||||
__
|
||||
/ \__ Developing using the "my-java-app" Devfile
|
||||
\__/ \ Namespace: odo-dev
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
↪ Running on the cluster in Dev mode
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo init
|
||||
__
|
||||
/ \__ Initializing a new component
|
||||
\__/ \ Files: Source code detected, a Devfile will be determined based upon source code autodetection
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
Interactive mode enabled, please answer the following questions:
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo dev
|
||||
__
|
||||
/ \__ Developing using the "my-nodejs-app" Devfile
|
||||
\__/ \ Namespace: odo-dev
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
↪ Running on the cluster in Dev mode
|
||||
|
||||
@@ -3,7 +3,7 @@ $ odo init
|
||||
__
|
||||
/ \__ Initializing a new component
|
||||
\__/ \ Files: Source code detected, a Devfile will be determined based upon source code autodetection
|
||||
/ \__/ odo version: v3.5.0
|
||||
/ \__/ odo version: v3.6.0
|
||||
\__/
|
||||
|
||||
Interactive mode enabled, please answer the following questions:
|
||||
|
||||
@@ -41,6 +41,10 @@ func StripSpinner(docString string) (returnString string) {
|
||||
if (strings.HasPrefix(line, "• Downloading") || strings.HasPrefix(line, "• Syncing") || strings.HasPrefix(line, "• Building")) && strings.HasSuffix(line, "...") {
|
||||
continue
|
||||
}
|
||||
// Remove warnings, execpt "Pod is Pending"
|
||||
if strings.HasPrefix(line, "⚠") && !strings.Contains(line, "Pod is Pending") {
|
||||
continue
|
||||
}
|
||||
|
||||
// for some reason, splitting the docString by \n does not split the spinner frames,
|
||||
// so we perform a side operation to remove the extra spinner frames that are not present in the final output
|
||||
|
||||
Reference in New Issue
Block a user