Closed nllarson closed 8 years ago
Hi Nick,
Is it possible to post part of your seed.groovy
file, at least around the line in error (line 22)? Because you're right, the BRANCH
is normally injected as a variable and your seed.groovy
should not fail on this.
Damien
Is the envInject
plugin installed? If not, this is a requirement for the seed plugin, and it might be missing in the list of dependencies?
I confirm that envinject
is not currently a dependency of the seed plugin, meaning that it was probably not installed.
I'll fix this soon for the 0.19.
In the meantime, as a workaround, you can install the envinject plugin yourself. You might have to regenerate your branch folder though.
Thanks for the issue! Damien
I basically copied the seed.groovy from the versioning project.
And the Environment Injector plugin is there.
If I understand correctly, your issue boils down to the fact that the following configuration, with your own settings of course:
is not present in the seed job of your branch folder, even if the envinject plugin is installed correctly.
If you extract the config.xml
of your job, if the environment section correctly generated? For example, for the nemerosa/versioning
sample, the corresponding XML is:
<buildWrappers>
<EnvInjectBuildWrapper>
<info>
<propertiesContent>PROJECT=nemerosa/versioning
PROJECT_CLASS=
PROJECT_SCM_TYPE=git
PROJECT_SCM_URL=https://github.com/nemerosa/versioning
PROJECT_SCM_CREDENTIALS=
BRANCH=master
SEED_PROJECT=versioning
SEED_BRANCH=master</propertiesContent>
<loadFilesFromMaster>false</loadFilesFromMaster>
</info>
</EnvInjectBuildWrapper>
</buildWrappers>
If this is present, but nothing is displayed, it might be a plugin version conflict.
That must be my issue. I do see those lines in my config.xml. So a plugin version conflict with the envInject plugin? Thanks for your help so far btw!
I've also noticed this in my Jenkins Config 'Manage Old Data' So something about the way the job generation is working isn't quite right when it comes to the xml.
hudson.model.FreeStyleProject application-api/application-api-release-0.6.5/application-api-release-0.6.5-build CannotResolveClassException: au.com.centrumsystems.hudson.plugin.buildpipeline.trigger.BuildPipelineTrigger
hudson.model.FreeStyleProject application-api/application-api-release-0.6.5/application-api-release-0.6.5-build CannotResolveClassException: EnvInjectBuildWrapper
I then created a new job by hand, and put in some 'Injected Properties', the config.xml for those looked like this:
<EnvInjectBuildWrapper plugin="envinject@1.92.1">
<info>
<propertiesContent>FOO=bar
WACKA=wacka</propertiesContent>
<loadFilesFromMaster>false</loadFilesFromMaster>
</info>
</EnvInjectBuildWrapper>
</buildWrappers>
Where the generated job's config.xml looked like this:
<buildWrappers>
<EnvInjectBuildWrapper>
<info>
<propertiesContent>PROJECT=client/application-api
PROJECT_CLASS=
PROJECT_SCM_TYPE=git
PROJECT_SCM_URL=https://bitbucket.org/client/application-api.git
PROJECT_SCM_CREDENTIALS=UUID-1234
BRANCH=develop
SEED_PROJECT=application-api
SEED_BRANCH=develop</propertiesContent>
<loadFilesFromMaster>false</loadFilesFromMaster>
</info>
</EnvInjectBuildWrapper>
<EnvInjectPasswordWrapper>
<injectGlobalPasswords>true</injectGlobalPasswords>
<passwordEntries/>
</EnvInjectPasswordWrapper>
</buildWrappers>
Hi Nick,
I've upgraded the seed plugin to use the latest version of the envinject
plugin (1.92.1). No problem so far.
Have you had a look in Jenkins log files to see if you had an error linked to the generation of your job?
Thanks, Damien.
Damien,
Thanks, I'll give the new version a look in the morning. I'll give the logs a look too. Thanks again!
I have a seed job configured like this:
Seed YAML:
Seed Job Config:
And
I then run the seed with these params:
Project Id: client/application-api SCM Url: https://bitbucket.com/client/application-api.git SCM Creds: (selected from dropdown)
It generates a Project folder and Project Seed. It looks fine, it takes a parameter of a BRANCH name.
From here is where I am kind of confused. I can't get the build to pick up PUSHES unless I manually start the Branch Seed for one of my branches. (Is this the correct way?) I manually start the
application-api-seed
job, enter a branch name of 'develop' and let it do its thing. It generates theapplication-api-develop
folder and seed. But the jobs that are created from myseed.groovy
file are not created. Here is that error.I looked at your Jenkins instance and noticed that the
Inject Environment Variables...
option is selected and populated on your Branch Seed job. (like this:)If I copy these properties to my config (but with my correct values) things seem to work, but I am fairly sure I shouldn't have to do that for each branch for each project.
I am using Jenkins 1.643 and Seed-Plugin 0.18.0