You are not logged in.

#1 2017-03-01 16:09:36

madhusudan.yasa
Member
5 posts

madhusudan.yasa said:

Commandline: how to pass args/parameters to talend env in script mode

i have written below script for publishing the talend application. I used script mode for publishing/

lunchTalend.bat : this will lunch talend env then execute publish commands

Talend-Studio-win-x86_64.exe -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace scriptFile /temp/publish.bat

publish.bat

initRemote -ul admin -up admin123
listCommand -a 
logonProject -pn PolicyService -ul admin -up admin123
listCommand -a
publishRoute PolicyService_BuildTest --version 0.1 --group Bamboo --artifactId PolicyService_BuildTest --publish-version 0.1.4-SNAPSHOT --snapshot --artifact-repository "" -u admin -p admin123
logoffProject

In the above script, i need to pass URL, version number, login and password details dynamically. Could you please help me how to pass above parameters to talend env.

Offline

#2 2017-03-06 08:07:59

xdshi
Talend Team


xdshi said:

Re: Commandline: how to pass args/parameters to talend env in script mode

Hi,

Have you tried to pass context parameter from commandline? 

In this way, you can pass values at runtime by modifying the launch script, for example: -

--context_param myString="modified value"

 

Best regards

Sabrina


What we can do is to make sure that Talend will be your best choice!

Offline

#3 2017-03-06 14:37:13

madhusudan.yasa
Member
5 posts

madhusudan.yasa said:

Re: Commandline: how to pass args/parameters to talend env in script mode

Talend-Studio-win-x86_64.exe -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace scriptFile D:/5.6.1/studio/temp/publish.bat --context_param login="admin" --context_param pwd="admin123"
I have tried to get the same param in publish.bat but i couldn't.
could you plz let me know how to get context param in below login
initRemote tac URL -ul {login} -up {pwd}

Offline

#4 2017-03-08 14:22:23

vharcq
Member
8 posts

vharcq said:

Re: Commandline: how to pass args/parameters to talend env in script mode

Onofre made it right here:
Using Maven between shell script parameter / environment variables and CommandLine script file

Offline

#5 2017-03-08 14:28:00

madhusudan.yasa
Member
5 posts

madhusudan.yasa said:

Re: Commandline: how to pass args/parameters to talend env in script mode

HI,
Thank you for response,
I'm using Talend 5.6 version which doesn't support Maven and other features.

-Madhu

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy