I want to set quite a few variables in Jenkins. I have tried putting them in .bashrc, .bash_profile and .profile of the jenkins user but Jenkins cannot find them when a build is happening.
The only way that is working is to put all the env variables inside the Jenkinsfile like this:
env.INTERCOM_APP_ID = '12312' env.INTERCOM_PERSONAL_ACCESS_TOKEN = '1231' env.INTERCOM_IDENTITY_VERIFICATION_KEY='asadfas' But I don't think this is a good way of doing it.
What is the correct way of setting env variables in Jenkins?