среда, 8 октября 2014 г., 13:26:31 UTC+3 пользователь 
aleksand...@privatbank.ua написал:
>
> I already ask question: 
> http://stackoverflow.com/questions/26235283/jenkins-ci-where-and-how-store-configuration-files/
>  
> without answers...
>
> I am in process of moving configuration parameters out of Java 
> application. I discover that the best approach is to extend your classpath 
> <http://stackoverflow.com/a/26147130/173149> and use .properties files 
> (leave ZooKeeper alone for another requirement).
>
> So my WAR file no longer have any hosts/IPs/URLs, users/passwords.
>
> DevOps distribute configs manually across test, stage, stable 
> installations.
>
> Now time for Jenkins to run tests. But they fail as there are no required 
> .propeties files in classpath.
>
> How can I load this config files to Jenkins and how to make in available 
> in test classpath?
>
> maven-surefire-plugin allow extending classpath 
> <http://maven.apache.org/surefire/maven-surefire-plugin/examples/configuring-classpath.html>
>  
> and passing system-properties 
> <http://maven.apache.org/surefire/maven-surefire-plugin/examples/system-properties.html>
> .
>
> So only question how to get separate directory in Jenkins hosting server 
> and load files to this directory and create alias/placeholder/envvar per 
> build job to refer to this path in build config.
>

I find answer myself. Here is copy of my  
http://stackoverflow.com/a/26261911/173149 :

A real most of Jenkins docs, ask at mail list and IRS. Yea - Jenkins 
community is silent. At docs I found link to **Config File Provider 
Plugin**, after that I visit 
http://builder.evil.com/jenkins/pluginManager/available page and look for 
*config* keyword.

There are a lot related plug-ins with various usefulness to my subject 
(most useless first):

 * https://wiki.jenkins-ci.org/display/JENKINS/Envfile+Plugin - This plugin 
enables you to set environment variables via a file.
 * https://wiki.jenkins-ci.org/display/JENKINS/Credentials+Binding+Plugin - 
Allows credentials to be bound to environment variables for use from 
miscellaneous build steps.
 * https://wiki.jenkins-ci.org/display/JENKINS/Environment+Script+Plugin - 
Allows you to run a script before each build that generates environment 
variables for it.
 * https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin - This 
plugin makes it possible to have an isolated environment for your jobs.
 * 
https://wiki.jenkins-ci.org/display/JENKINS/Copy+Data+To+Workspace+Plugin - 
Copies data to workspace directory for each project build.
 * https://wiki.jenkins-ci.org/display/JENKINS/Copy+To+Slave+Plugin - This 
plugin allows to copy a set of files, from a location somewhere on the 
master node, to jobs' workspaces. It also allows to copy files back from 
the workspaces of jobs located on a slave node to their workspaces on the 
master one.
 * https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+Plugin 
- Adds the ability to provide configuration files (i.e., settings.xml for 
maven, XML, groovy, custom files, etc.) loaded through the Jenkins UI which 
will be copied to the job's workspace.

Only last plug-in - [Config File Provider Plugin][1] allow editing configs 
via Jenkins WEB interface. And it have brother -  [Managed Script 
Plugin][2] - for uploading/managing/editing custom scripts. No question now 
I use **Config File Provider Plugin**!

  [1]: 
https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+Plugin
  [2]: https://wiki.jenkins-ci.org/display/JENKINS/Managed+Script+Plugin

>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to