0
votes

I'm seeing some odd behavior in our Jenkins setup.

We have a typical 3 environment setup:

Dev, Test, Prod,

Jenkins is configured to build all of them.

Dev is configured to poll an SVN repository every 15 minutes and do a build if there has been an update.

Test has been configured with this option: "This project builds a Subversion feature branch", builds using the last successful Dev build code, and is manually triggered.

The problem is this: Dev builds fine. Test, however, doesn't build using the correct SVN revision the first time. After checking the console output, I see where it brings down the correct revision to the workspace, it's set to do a fresh checkout each time and merges the changes in. But, when I look at the generated command line, as the project is built using Maven, the svn revision passed to the command is actually the second to last successful build instead of the last.

The svn revision is being passed using Jenkin's SVN_REVISION variable, which is somehow getting reset to the old value. I've scoured the documentation and done a lot of Googling, and I just can't determine if the problem is a bug in the Subversion module (2.6), Jenkins (1.642.4), or if it's the way the Test build is configured. I've checked the SVN and Jenkins server times and verified they're in sync, so it's not a time related issue. When Test is built a second time, it picks up the correct version.

I'm not a Jenkins expert, so maybe I'm overlooking something, but there's no obvious (to me) cause for the issue and any ideas are welcome.

Thanks.

1
What is the Upstream project name of Test. Merge the changes with what?Joao Vitorino
So, the Test build points at a different svn repo than the Dev build. The Test build does a prebuild rebase into it's svn repo from the last successful Dev build, then builds from it's svn repo, if I'm reading it right.Alex
Are the tests part of the usual project? It sounds like they are not?khmarbaise

1 Answers

0
votes

Ok, issue solved. Turns out the test build wasn't using the dev code base directly. Instead, Test was building a feature branch AND doing a code rebase pre-build. For whatever reason, the rebase was being done but the build wasn't picking up the changes. So, I changed the Dev build to produce a tag in SVN after a successful build and then changed the repository location to point to the newly tagged Dev code. Viola, no more issues with changes not being included.