Jenkins – 环境变量 – 位置未找到?

huangapple go评论57阅读模式
英文:

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.

Jenkins – 环境变量 – 位置未找到?

Jenkins – 环境变量 – 位置未找到?

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'

huangapple
  • 本文由 发表于 2023年4月17日 18:25:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/76034159.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定