-
Notifications
You must be signed in to change notification settings - Fork 82
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
Option to use KUBECONFIG when running ODS-CI Image #1247
base: master
Are you sure you want to change the base?
Conversation
In run_robot_test.sh we called yq -er, but after upgrading to latest yq version 4.25, it is not supported (and can break the script): ``` $ yq --version yq (https://github.com/mikefarah/yq/) version 4.25.1 $ yq -r Error: unknown shorthand flag: 'r' in -r ``` Signed-off-by: manosnoam <[email protected]>
Signed-off-by: manosnoam <[email protected]>
Robot Results
|
@@ -1,28 +1,32 @@ | |||
#!/bin/bash | |||
set -e |
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.
awesome, +100
set -e | |
set -Eeo pipefail |
This is the recommendation from https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/, leaving out -u
because that needs more work
echo "Couldn't find '.OCP_ADMIN_USER.USERNAME' variable in provided '${TEST_VARIABLES_FILE}'." | ||
echo "Please either provide it or use '--skip-oclogin true' (don't forget to login to the testing cluster manually then)." | ||
exit 1 | ||
} | ||
oc_pass=$(yq -er '.OCP_ADMIN_USER.PASSWORD' "${TEST_VARIABLES_FILE}") || { | ||
oc_pass=$(yq -e '.OCP_ADMIN_USER.PASSWORD' "${TEST_VARIABLES_FILE}") || { |
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.
This will change behavior for those who use the Python based yq
implementaiton, see #953:
$ yq -e '.OCP_ADMIN_USER.PASSWORD' "ods_ci/test-variables.yml"
"heslo"
$ yq -er '.OCP_ADMIN_USER.PASSWORD' "ods_ci/test-variables.yml"
heslo
$ yq --version
yq 3.2.3
For more context, see d498907.
Note: latest GoLang based yq
version is v4.42.1
(https://github.com/mikefarah/yq/releases).
Truth is that we have both implementation of yq
in our CI image now. But looks like the Jenkins job still work. So we should be careful with changes here and rather than this, I would actually invite an agreement on the aforementioned issue and do a proper fix 🤔
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.
Also, the -r
works for me even with the GoLang based implementation 🤔 :
$ /tmp/yq_linux_arm64 -er '.BROWSER.NAME' "ods_ci/test-variables.yml"
chrome
$ /tmp/yq_linux_arm64 --version
yq (https://github.com/mikefarah/yq/) version v4.42.1
Quality Gate passedIssues Measures |
@manosnoam we tested the container image created from this PR and these are the logs
|
Thanks for the update, it shows that the IDP users created without OCM
using this pr, which is what you requested afaik.
Jan, regarding ods_ci/run_robot_test
<#1247 (comment)>
.sh
I think the CSPI team uses it only, so I don't see any risk in this pr.
…On Tue, Mar 19, 2024, 15:09 Chetna ***@***.***> wrote:
@manosnoam <https://github.com/manosnoam> we tested the container image
created from this PR and these are the logs
---> Adding additional HTP users, if needed per requested configuration
Adding password for user htp-basic-user-dvQBzwOVXjmbHAEIUPCM1
Adding password for user htp-basic-user-dvQBzwOVXjmbHAEIUPCM2
secret/htpasswd-secret replaced
Stage) Setting LDAP Identity provider
--> Generating users based on requested configuration
elaborating prefix: ldap-op-
--> suffix type: incremental_with_rand_base
elaborating prefix: ldap-usr-
--> suffix type: incremental_with_rand_base
elaborating prefix: ldap-noaccess-
--> suffix type: incremental_with_rand_base
elaborating prefix: ldap-special
--> suffix type: custom
--> configuring LDAP server and users
namespace/openldap created
secret/openldap created
service/openldap created
deployment.apps/openldap created
secret/ldap-bind-password createdoauth.config.openshift.io/cluster patched
Stage) Configure RHODS test user groups
Error from server (AlreadyExists): groups.user.openshift.io "rhods-admins" already existsgroup.user.openshift.io/rhods-users createdgroup.user.openshift.io/rhods-noaccess createdgroup.user.openshift.io/dedicated-admins created
rhods-admins dedicated-adminsgroup.user.openshift.io/rhods-admins added: "ldap-op-NhARCyYLXfZbnrPlDmvS1"group.user.openshift.io/rhods-admins added: "ldap-op-NhARCyYLXfZbnrPlDmvS2"group.user.openshift.io/rhods-admins added: "ldap-op-NhARCyYLXfZbnrPlDmvS3"group.user.openshift.io/rhods-admins added: "ldap-op-NhARCyYLXfZbnrPlDmvS4"group.user.openshift.io/rhods-admins added: "ldap-op-NhARCyYLXfZbnrPlDmvS5"group.user.openshift.io/dedicated-admins added: "ldap-op-NhARCyYLXfZbnrPlDmvS1"group.user.openshift.io/dedicated-admins added: "ldap-op-NhARCyYLXfZbnrPlDmvS2"group.user.openshift.io/dedicated-admins added: "ldap-op-NhARCyYLXfZbnrPlDmvS3"group.user.openshift.io/dedicated-admins added: "ldap-op-NhARCyYLXfZbnrPlDmvS4"group.user.openshift.io/dedicated-admins added: "ldap-op-NhARCyYLXfZbnrPlDmvS5"
rhods-usersgroup.user.openshift.io/rhods-users added: "ldap-usr-bJPDeKLszXCEoAVxNHgc1"group.user.openshift.io/rhods-users added: "ldap-usr-bJPDeKLszXCEoAVxNHgc2"group.user.openshift.io/rhods-users added: "ldap-usr-bJPDeKLszXCEoAVxNHgc3"group.user.openshift.io/rhods-users added: "ldap-usr-bJPDeKLszXCEoAVxNHgc4"group.user.openshift.io/rhods-users added: "ldap-usr-bJPDeKLszXCEoAVxNHgc5"
rhods-noaccessgroup.user.openshift.io/rhods-noaccess added: "ldap-noaccess-WUFqQpAMlGLmoZybjNRw1"group.user.openshift.io/rhods-noaccess added: "ldap-noaccess-WUFqQpAMlGLmoZybjNRw2"group.user.openshift.io/rhods-noaccess added: "ldap-noaccess-WUFqQpAMlGLmoZybjNRw3"group.user.openshift.io/rhods-noaccess added: "ldap-noaccess-WUFqQpAMlGLmoZybjNRw4"group.user.openshift.io/rhods-noaccess added: "ldap-noaccess-WUFqQpAMlGLmoZybjNRw5"
rhods-usersgroup.user.openshift.io/rhods-users added: "ldap-special."group.user.openshift.io/rhods-users added: "ldap-special^"group.user.openshift.io/rhods-users added: "ldap-special$"group.user.openshift.io/rhods-users added: "ldap-special*"group.user.openshift.io/rhods-users added: "ldap-special?"group.user.openshift.io/rhods-users added: "ldap-special("group.user.openshift.io/rhods-users added: "ldap-special)"group.user.openshift.io/rhods-users added: "ldap-special["group.user.openshift.io/rhods-users added: "ldap-special]"group.user.openshift.io/rhods-users added: "ldap-special{"group.user.openshift.io/rhods-users added: "ldap-special}"group.user.openshift.io/rhods-users added: "ldap-special|"group.user.openshift.io/rhods-users added: "ldap-special@"group.user.openshift.io/rhods-users added: "ldap-special;"
Stage) Sleeping 180sec to wait for IDPs to become available
-----| ODS-CI is starting the tests run...|-----
ods_ci/test-variables.yml
INFO: we found a yq executable
—
Reply to this email directly, view it on GitHub
<#1247 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACLUMWOXPE3UUWZCIFJLORLYZA2G5AVCNFSM6AAAAABEECBK4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBXGEZTKMJVGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hm, but the part I commented is in the |
Add option to use KUBECONFIG when calling ods_ci/build/run.sh
Fix yq commands for yq version 4.25 (-r is not supported)
Running example:
Output: