-g_<variable_name> should work with secret text in Jenkins

-g_<variable_name> should work with secret text in Jenkins

As per Command Syntax (Command-line/Console Mode Execution) | Katalon Docs

On Jenkins with Katalon plugin it works only if you realy put someting like -g_userName="admin" BUT IT’S NOT OVERRIDING the Execution Profile variable if you try to get its value from a Jenkins’s secret text like this

Please note that -apikey=%apikey% works ( $apikey should be used on Linux)

1 Like

@gdearest07 I already submitted a ticket for this feature request to the Product Team. I will update you when they reply back.

2 Likes

Thank you, @chen.lee ! Being able to get values from secret text in Jenkins is an extremely important feature. It shouldn’t be dificult to fix for -g_<variable_name> since it works for -apikey=%apikey%,

@gdearest07, I received their reply. Their response is to change the global variable by the desired scenario tags during runtime, use the following command syntax -g_XXX, for example, -g_userName="admin".

@chen.lee , if that is Katalon developers responce, tnen they do not undestand what IS THE PROBLEM.
As I wrote above:

On Jenkins with Katalon plugin it works only if you realy put someting like -g_userName="admin" BUT IT’S NOT OVERRIDING the Execution Profile variable if you try to get its value from a Jenkins’s secret text like this

Please note that -apikey=%apikey% works

Is there any way to get to the Developers lead so he can explain to developers what is the problem?

Hello, @vu.tran

Perhaps, you can explain to Katalon developres what is the problem?

You closed this topic on Sep 13:

https://forum.katalon.com/t/g-variable-name-is-not-working-with-secret-text-in-jenkins/78465/3

1 Like

Hi @gdearest07, I closed the topic due to the duplication. Thanks for bringing it back up to our attention. I will definitely talk to product team and let them know your feedback. Best.

Hi @gdearest07

Currently, the ability to pass secret text of Jenkins via -g_<variable_name> and get it masked or encrypted is not yet supported. We acknowledge the security need from you and will plan to improve it in upcoming releases.

Thank you for your patience,
Jass

2 Likes

Hi @gdearest07
We have not supported override API key with Glocal Variable command. It only support override Execution Profile variables

1 Like

@huyen.nguyen2 , who was aking about “override API key with Glocal Variable command”?

If you still cannot undersatnd what the problem is, you can ask @Jass to help you:

Hi @gdearest07
Sorry for misunderstanding. Could you help provide your Build logs from Jenkins for further investigate?
Thanks in advance,

1 Like

@huyen.nguyen2 , there is no specific Jenkins error. Just create a simple Katalon project with a test that checks the value of some global variable (e.g. the variable secret is expected to have the value “123” ) and try to get that value from Jenkins.

In case of using something like -g_secret=“123”, the value of secret in your test will be “123” (as expected) - RIGHT SECRET

In case of using -g_secret=%secret% (where secret is a Jankins secret set up in Jenkins with value “123”) you will not be able to get ‘123’ in your test - WRONG SECRET