简体   繁体   中英

How to add Jenkins environment variable in github gradle.properties file

I have setup a credential in Jenkins credential manager.

I'm accessing it in environment stage of jenkins as-

TOKEN = credentials("token")

Now in my github gradle.properties file, I want to use this TOKEN. Something like

password = env.TOKEN

In the repository can use: "${System.env.TOKEN}"

Then in the pipeline use withCredentials .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM