I'm trying to do something I think is pretty typical with the promoted_builds plugin, but I'm running into problems. Here's what I want to do- 1. Run a maven build 2. Preserve its pom.xml and target/*.jar 3. Create a promotion step where I push this jar to nexus.
I've tried two different approaches with limited success- *Approach 1- Everything in one project* 1. Mark pom.xml,target/*jar as archived artifacts 2. Add a deploy to maven repo promotion action 3. Execute the manual promotion I get this error- Legacy code started this job. No cause information is available Building in workspace /export/data/build/dgcs/jenkins_experimental/jobs/sample/workspace Promoting sample #25 [ERROR] No artifacts are recorded. Is this a Maven project? build hudson.plugins.promoted_builds.tasks.RedeployBatchTaskPublisher@42b215c8 FAILURE Notifying upstream projects of job completion Finished: FAILURE *Approach 2 - Using a second project for deploying to nexus* 1. Create a deploy project (type maven 2) 2. Set up promotion stage to trigger deploy project 3. Promotion project uses artifact copy to copy pom.xml,target/*jar in place, using a specific build number of $PROMOTED_NUMBER 4. Add post build step to push to nexus When I use this approach, I can get it to work with a permalink, but I can't seem to pass the proper build number. I get this error. It seems like the artifacts copy plugin isn't resolving $PROMOTED_NUMBER- Building in workspace /export/data/build/dgcs/jenkins_experimental/jobs/sample_artifacts_deploy/workspace ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-us...@googlegroups.comjava.lang.NumberFormatException <http://stacktrace.jenkins-ci.org/search?query=java.lang.NumberFormatException>: For input string: "$PROMOTED_NUMBER" Also, the promotion reports a failure as success. I should note that if I add a post build step to deploy to nexus, it works, so I'm sure my dpeloyment settings are good. Does anybody have any advice of how to set this up properly? As I said before, if I could get it in one project that would be optimal, but any paproach that works would be most welcome. I'm running jenkins 1.456 and promoted builds plugin 2.4 Thanks.