Issue Type: Bug Bug
Affects Versions: current
Assignee: Gregory Boissinot
Attachments: config.xml
Components: envinject
Created: 28/Nov/12 7:23 PM
Description:

Properties set in the job configuration can be used in the SCM configuration, but they do not appear to be applied to the 'Poll SCM' build trigger.

In our environment, we specify the Perforce 'Client View Type' as 'View Map from File', and the file name depends on project parameters. When such a build is triggered manually, the parameters are applied. Here is the the first few lines of output from the 'Console Output' for a manual build.

Started by user Travis Vitek
[EnvInject] - Loading node environment variables.
[EnvInject] - Preparing an environment for the build.
[EnvInject] - Keeping Jenkins system variables.
[EnvInject] - Keeping Jenkins build variables.
[EnvInject] - Adding build parameters as variables.
[EnvInject] - Injecting as environment variables the properties content 
PROJECT_BRANCH=main
PROJECT_NAME=tools

[EnvInject] - Variables injected successfully.
[EnvInject] - Injecting contributions.
Building remotely on jayhawk in workspace /build/jenkins-slave/workspace/jenkins-test

Deleting project workspace... Read ClientSpec from: //projects/main-tools.clientspec
[jenkins-test] $ "C:\Program Files\Perforce\p4.exe" print -q //projects/main-tools.clientspec

But when the the 'Poll SCM' build trigger is used, the parameters are not applied. Here is the output of the 'Perforce Polling Log'

Started on Nov 28, 2012 11:17:51 AM
Looking for changes...
Using node: jayhawk
Read ClientSpec from: //projects/${PROJECT_BRANCH}-${PROJECT_NAME}.clientspec
[jenkins-slave] $ "C:\Program Files\Perforce\p4.exe" print -q //projects/${PROJECT_BRANCH}-${PROJECT_NAME}.clientspec
Project: Jenkins
Priority: Major Major
Reporter: Travis Vitek
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to