英文:
Jenkins - Environment Variables - Location not found?
问题
I have Jenkins jobs in which I need to specify a variable (COMMON_DATA_HOME) within a job. I provide the full Windows path for this variable, but the job keeps failing (see error image). It seems to be searching for the variable path within the job's own location, which is not what I've set in the environmental variable. I'm unsure why it's looking there or how I can make it look outside the build path.
英文:
So I have a number of Jenkins jobs where within a job I need to specify a variable (COMMON_DATA_HOME). I give it the full Windows path to that variable but the job keeps failing (see error image), it seems to be looking within the jobs own location for the variable path but that's not what I've set in the environmental variable so I'm not sure why its looking there or how I can get it to locate outside the build path.
Run build and the job should be successful and copy what its needs to from the Common location but it doesn't.
答案1
得分: 1
Changing the variable to forward slashes worked. So initial variable 'COMMON_DATA_HOME=C:\Windows\System32\config\systemprofile.jenkins\workspace\common-pf-test\Common' is now 'COMMON_DATA_HOME=/Windows/System32/config/systemprofile/.jenkins/workspace/common-pf-test/Common'
英文:
Changing the variable to forward slashes worked. So initial variable 'COMMON_DATA_HOME=C:\Windows\System32\config\systemprofile.jenkins\workspace\common-pf-test\Common' is now 'COMMON_DATA_HOME=/Windows/System32/config/systemprofile/.jenkins/workspace/common-pf-test/Common'
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论