Skip to content
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

Add support for $IQE_CJI_NAME to populate CJI_NAME when given #113

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

prichard77
Copy link
Contributor

We are working on adding floorist plugin tests to the pr_check process for policies. We have a working implementation using 2 cji jobs but they are both named the same. We need to ability to overwrite the cji name via an environment variable. This is a pattern that is already done with several items inside of cji_smoke_test.sh . We just need to extend this functionality to CJI_NAME.

@prichard77
Copy link
Contributor Author

I am a bit unclear as to how to test this. I am going to try and create a test PR for policies-ui-backend where I overwrite the call to cji_smoke_test to use my updated version in my repo. I do not know if this will work, but I'll give it a try.

@prichard77
Copy link
Contributor Author

I was able to test this a bit by adding a cli_smoke_test.sh that used the new env var to the policices-ui-backend repo and updating the call to cli_smoke_test.sh to use the local version. You can see the --cji-name getting added in the deploy cji command : https://ci.ext.devshift.net/job/RedHatInsights-policies-ui-backend-pr-check/712/console#:~:text=18%3A11%3A03%20%2B%2B%2B%20bonfire,hms%20%2D%2Dnamespace%20ephemeral%2Dhpcdxo

@jrwho
Copy link

jrwho commented Sep 20, 2024

Should it be CJI_NAME or IQE_CJI_NAME? It seems specific to IQE so i just want to make sure thats intended

@prichard77
Copy link
Contributor Author

prichard77 commented Sep 20, 2024

@jrwho regarding your comment on CJI_NAME or IQE_CJI_NAME . Inside of cli_smoke_test CJI_NAME is used in the code to do a couple things and I did not change this. What I did was use an env var, IQE_CJI_NAME, to allow us to pass in this value and overwrite CJI_NAME with it. This pattern is used many times in cji_smoke_test. See the list of other IQE_xxxx vars defined (commented) at the top of the file.
Before my update CJI_NAME was always populated with $COMPONENT_NAME.

Copy link
Contributor

@skarekrow skarekrow left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Victoremepunto Victoremepunto left a comment

Choose a reason for hiding this comment

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

Please add some quotes, other than that LGTM

cji_smoke_test.sh Outdated Show resolved Hide resolved
@Victoremepunto Victoremepunto merged commit acaf973 into RedHatInsights:main Sep 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants