1

I'm trying to create environment variable via internal Maven plugin so I can access it via Jenkins pipeline. Normally - inside the JVM I can run: System.setProperty("myvar","myvalue"); but of course it can be accessed via the Java itself only. Running echo ${myvar} from the pipeline script will return null. I am looking for a way to add environment variable to Jenkins build maybe via Jenkins API. is it possible? Are there better ways to do it? We are working on TeamCity and it can be easily done via ##teamcity[setParameter name='envname' value='envvalue']. Any ideas how to do it from Jenkins?

2

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.