David H
David H

Reputation: 1356

Jenkins integration test different environments

I have a project that need to works on windows\linux with those databases : oracle\sqlserver. Our project is built by Maven.

I have installed Jenkins with master\slave set-up.

master: windows + sqlserver

slave : linux + oracle

for our testing.

Jenkins - Promoting a build to different environments

but its really not helping that much for me.

I have also read Jenkins wiki : https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds

but i still cannot figure out how should i do it.

Since compiling our code takes a lot of time i would like to do it just once than use the final result and test it on those environments master and slave. build succes only if he runs on both environments.

I have also noticed that i cannot invoke on "post steps" at jenkins to do it. i didn't find any plugin that can really help with deploying and testing on the slave.

I have read somewhere that maybe i should split it to 3 jobs and not to use one job. first job compiles, and then other jobs are running integration test. you can look at : http://zeroturnaround.com/rebellabs/the-correct-way-to-use-integration-tests-in-your-build-process/

I hope you could advise to me how should i do it.

Thanks

Upvotes: 1

Views: 1949

Answers (1)

gareth_bowles
gareth_bowles

Reputation: 21150

I would split the build up as follows:

  1. Job 1 compiles the code, runs unit tests and builds your deployable artifact (since you're using Maven, I assume you have a JAR or WAR file)
  2. Job 2 deploys and runs the artifact - you could use build parameters to specify environment-specific criteria.
  3. Job 3 runs the integration test and reports results.

Upvotes: 1

Related Questions