BCDevOps / bcdk

BC Developer Kit
Apache License 2.0
6 stars 15 forks source link

deploying to minishift fails because "oc version" doesn't return openshift version - tested on Windows 10 #37

Closed RajvirBains closed 4 years ago

RajvirBains commented 4 years ago

Issue in generators/AbstractGenerator.js

In the below code, we run oc version and then extract oc and openshift version from the output.

    const ocVersion = spawnSync("oc", ["version"], { encoding: "utf-8" });
    const ocVersionLabel = ocVersion.stdout.match(/oc v\d+\.\d+/gm)[0].substring(3);
    const openshiftVersionLabel = ocVersion.stdout.match(/openshift v\d+\.\d+/gm)[0].substring(10);

On Windows 10, oc version returns the below output. Openshift version is not returned.

D:\BCDevOps\agri-nmp>oc version
oc v3.11.82
kubernetes v1.11.0+d4cacc0
features: Basic-Auth SSPI Kerberos SPNEGO

Server https://192.168.4.138:8443
kubernetes v1.11.0+d4cacc0

A separate command to check openshift version returns the below.

D:\BCDevOps\agri-nmp>minishift openshift version
openshift v3.11.59

I will first retest this on the latest CDK installed on Windows 10 and confirm if we need to fix anything and will propose a solution for this.

RajvirBains commented 4 years ago

fixed by Clecio