mohamicorp / stash-jenkins-postreceive-webhook

Webhook used to notify Jenkins when commits are made to Stash
Other
138 stars 98 forks source link

Parameterized build for different environment in Jenkins #26

Closed rhenatas closed 7 years ago

rhenatas commented 11 years ago

Hi,

I have a requirement to do the build in different environment depends upon the parameter in Java application. Following are my environments

a) Development environment b) Testing environment c) Beta environment (would be production environment)

I have different parameters like connectivity, jdbc and ldap parameters for the above 3 environments that are maintained in resource bundle properties. Currently, i am changing the parameters manually to deploy it respective environment.

If i have to do the build in Jenkins, i need to create three different jobs for 3 different environment

Requirement would be as follows:

a) On click of Development environment job, would pull the souce code from Git b) Depends upon environment, it has to dynamically take the parameter from properties file and pass the
values to application. c) Does the build and create a war file d) Copy the war file in respective folders (Development artifact folder, test artifact folder and beta artifact folder)

It would be appreciated to let me know what plugins / features exist in the Jenkins to take this forward or any work around solution.

Thanks, Rhenatas

ghost commented 9 years ago

@mikesir87 I have to do similar thing and have no clues. If you found the solution, could you please share here.

alexBraidwood commented 7 years ago

I believe this is a Jenkins-specific question and would pertain more to setting up a Pipeline for each of the environments.