Skip to content

Modify jenkins steps to adjust 4.0 change #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 29, 2019

Conversation

xiuwang
Copy link
Contributor

@xiuwang xiuwang commented Mar 6, 2019

jenkins log
@openshift/devexp-qe please help review

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 6, 2019
@xiuwang
Copy link
Contributor Author

xiuwang commented Mar 6, 2019

When get server version of 4.0 above cluster, the returned result is "Server Version: version.Info{Major:"1", Minor:"12+".....}", so I add one step "Given /^I have a jenkins server with above 40 cluster$/ do" .
After enable any openshift oauth, we get two choose when login openshift webconsole, the kubeadmin account and common account. So I add steps "jenkins_multi_oauth_login" and "Given /^I log into jenkins with above 40 cluster$"

@xiuwang xiuwang changed the title Modify jenkins steps to adjust 4.0 change [WIP] Modify jenkins steps to adjust 4.0 change Mar 6, 2019
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 6, 2019
@akostadinov
Copy link
Contributor

akostadinov commented Mar 6, 2019

We should rather update Environment#get_version method work using the 4.x call instead of the old one. Then use existing step /^the master version ([<>=]=?) #{QUOTED}$/

wrt the login step,what is the need of this new step?

@akostadinov
Copy link
Contributor

Master branch is only for 4.0 cluster version. Can we update existing step instead?

@xiuwang
Copy link
Contributor Author

xiuwang commented Mar 25, 2019

@akostadinov since this pr [1], the version for 4.0 is kubernetes version now, could we use client version instead ?
[1] openshift/origin#21434

@xiuwang
Copy link
Contributor Author

xiuwang commented Mar 25, 2019

For the login step,need add a step to choose the auth type since there are two auth type(kubeadmin and other one auth type) at least.

@akostadinov
Copy link
Contributor

I need to check how we can do things. Maybe we can use clusterversion instead. WDYT?

@xiuwang
Copy link
Contributor Author

xiuwang commented Mar 26, 2019

@akostadinov get clusterversion need admin role, IMO, it's not a best choice.
Could we hardcode the version to 4.0 here ? I will try launch a 3.2 version to see if version/openshift could be obtained, later will add more comment.

@xiuwang
Copy link
Contributor Author

xiuwang commented Mar 26, 2019

Both 3.1 and 3.2 version get 403 forbidden when access version/openshift url.

@xiuwang
Copy link
Contributor Author

xiuwang commented Mar 26, 2019

We have a cmd openshift version that common user could use, this works in all 3.x and 4.0 cluster.

3.1
$openshift version
openshift v3.1.1.11-9-g44fe9ba
kubernetes v1.1.0-origin-1107-g4c8e6f4
etcd 2.1.2

4.0
$openshift version
openshift v4.0.2

@akostadinov
Copy link
Contributor

akostadinov commented Mar 26, 2019

I think that openshift version would return version of binary instead of version of server. Am I wrong?

btw from bugzilla I see that probably there is a way to get api server version somehow. But still no info how. Do you know this?

@xiuwang
Copy link
Contributor Author

xiuwang commented Mar 27, 2019

Alex, you are right, openshift version returns the binary version, and this cmd has been deprecated from latest 4.1 package.
IMO, the devel said the way in bug might be https://bugzilla.redhat.com/show_bug.cgi?id=1658957#c11 .
Meantime ,confirmed with yapei, <yapei> xiuwang, no, clusterversion info is shown on Administration -> Cluster Settings page on web console which is invisible for non cluster-admin users.

@akostadinov
Copy link
Contributor

I'm trying to reach directly to the developer to see what he meant by getting api server version.

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 28, 2019
@xiuwang xiuwang force-pushed the master branch 3 times, most recently from 0eceb71 to 6dadbfa Compare March 28, 2019 06:06
@xiuwang
Copy link
Contributor Author

xiuwang commented Mar 28, 2019

@@ -102,11 +103,16 @@
# non-SSO login.
# Installation step also installs based on this.
Given /^I log in to jenkins$/ do
if env.version_ge("3.4", user: user) && user.password?
if env.version_ge("3.4", user: user) && env.version_le("3.11", user: user) && user.password?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this branch we should only support 4.x, conditions for older cluster verisions better be gone. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v3 branch is for 3.x? Could the cvp tool choose the branch, since default branch is master in runner-v3 job

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what CVP is. In any case, master branch not suitable to run stuff on 3.x

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CVP is [container verification pipeline tool][https://docs.engineering.redhat.com/pages/viewpage.action?spaceKey=CVP&title=Container+Verification+Pipeline+E2E+Documentation#ContainerVerificationPipelineE2EDocumentation-ProductTests) which anli is taking development.
I will remove the conditions for older cluster verisions later.

@xiuwang xiuwang changed the title [WIP] Modify jenkins steps to adjust 4.0 change Modify jenkins steps to adjust 4.0 change Mar 28, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 28, 2019
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 29, 2019
@xiuwang
Copy link
Contributor Author

xiuwang commented Mar 29, 2019

@akostadinov Removed the conditions for older cluster verisions, and test case passed.

@akostadinov
Copy link
Contributor

/lgtm

Thank you!

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 29, 2019
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akostadinov, xiuwang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 29, 2019
@openshift-merge-robot openshift-merge-robot merged commit 50b9c74 into openshift:master Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants