1

I am a novice to Jenkins administration, trying to help a friend set up Jenkins for his startup.

I know there are plugins in Jenkins but not quite familiar on how to achieve his requirements.

He has a spring application which uses dispatcher.xml to reference jdbc.properties (one for each environment eg: jdbc_dev, jdbc_test, jdbc_prod.

How do I setup environment variables in Jenkins so the respective jdbc.properties is picked when the war file is built ?

2 Answers 2

1

I think following plugins will help your friend a lot.

1) EnvInject Plugin:- To inject environment variables depending on the requirements.

2) Role strategy :- To manage authorization and permissions of various users. For eg: Admin,Tester,Developer,guest.

For more info on configuration on this plugin read this Answer

3) JobConfigHistory Plugin:- To revert changes if you screw anything.

Hope it helps.

Sign up to request clarification or add additional context in comments.

Comments

0

See Parameterized Build:

Sometimes, it is useful/necessary to have your builds take several "parameters".

...

The parameters are available as environment parameters variables. So e.g. a shell ($FOO, %FOO%) or Ant (${env.FOO}) can access these values.

[Corrections by me.]

See also the Matrix Project Plugin:

A multi-configuration project is useful for instances where your builds will make many similar build steps, and you would otherwise be duplicating steps.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.