This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 200
Fix(GH-6918): Updates required for crc #6919
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Oct 15, 2019
6dcf192
to
33f2627
Compare
zregvart
reviewed
Oct 17, 2019
@@ -11,7 +11,7 @@ check_oc_version() | |||
local minimum=${OC_MIN_VERSION} | |||
local test=$(oc version | grep "^oc" | tr -d oc\ v | cut -f1 -d "+") | |||
if [ "$test" = "" ]; then | |||
local test=$(oc version | grep 'Client Version' | sed "s/^.*GitVersion:\"v\(.*\)\", GitCommit.*$/\1/") | |||
local test=$(oc version | grep 'Client Version' | sed "s/^.*GitVersion:\"v\(.*\)\", GitCommit.*$/\1/" | sed "s/Client Version: v//") |
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.
For oc downloaded from https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/latest/:
$ ./oc version
Client Version: openshift-clients-4.2.0-201910041700
Kubernetes Version: v1.11.0+d4cacc0
$ ./oc version | grep 'Client Version' | sed "s/^.*GitVersion:\"v\(.*\)\", GitCommit.*$/\1/" | sed "s/Client Version: v//"
Client Version: openshift-clients-4.2.0-201910041700
In that case this might work better:
Suggested change
local test=$(oc version | grep 'Client Version' | sed "s/^.*GitVersion:\"v\(.*\)\", GitCommit.*$/\1/" | sed "s/Client Version: v//") | |
local test=$(oc version | grep -i 'client version'|sed -e 's/.*: \(openshift-clients-\)\{0,1\}//') |
Might be a good idea to add tests for this.
Also of note is that there's a yaml/json output in the 4.2 of oc version
, doesn't seem to be much useful at the moment:
$ ./oc version --client -o json
{
"clientVersion": {
"major": "",
"minor": "",
"gitVersion": "openshift-clients-4.2.0-201910041700",
"gitCommit": "d5465d715197862b15c8cf05e864d7c3cfea6917",
"gitTreeState": "clean",
"buildDate": "2019-10-07T15:16:39Z",
"goVersion": "go1.12.8",
"compiler": "gc",
"platform": "linux/amd64"
}
}
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.
* CRC does not appear to contain postgresql 9.5 and usages results in the syndesis-db not installing due to "invalid image" * Adds extra regexp processing to ensure the CRC version of oc is correctly parsed
33f2627
to
d82c572
Compare
zregvart
approved these changes
Oct 17, 2019
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.
👍 perfect, thanks!
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
group/install
Installing Syndesis (templates, scripts)
pr/approved
Applied by pure-bot when a review is approved
pr/review-requested
Use this if you want to have a review. pure-bot will prevent merging if set and no review given
size/XS
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CRC does not appear to contain postgresql 9.5 and usages results in the
syndesis-db not installing due to "invalid image"
Adds extra regexp processing to ensure the CRC version of oc is
correctly parsed