Yeah, if you didn't enable "Archive the artifacts" in the old builds, i.e. you don't have the WAR file (or whatever it is you want to deploy), you'd have to take the approach of re-checking out the source, building and then doing whatever deployment steps you want.

But if you *did* archive the previous artifacts you could redploy them from another job as follows:

Install the Copy Artifact plugin.

Create a new job, enable "This build is parameterized", and add a "Build selector for Copy Artifact". Call it "BUILD_TO_DEPLOY", for example. Choose "Specific build" and leave the build number empty (or enter a default, like "1").

Add a new build step: Copy artifacts from another project. Enter the project name you want to copy the WAR file from. For "Which build", choose "Specified by a build parameter" and as the name enter "BUILD_TO_DEPLOY". Under artifacts to copy, enter "**/*.war".

Now whenever you run this job, you will have the previously built WAR files from whichever previous build you want, allowing you can deploy them however you like (e.g. "Publish over SSH" or "WebLogic Deployer" plugins).

Regards,
Chris


On 06/12/12 17:10, Jerry wrote:
Hi, Anba. Unless you had already set something up beforehand, it will
not be possible to deploy old builds. Jenkins typically generates
artifacts inside a workspace, and that same workspace is re-used every
time a new build is run. Thus the old artifacts are overwritten.

What you /could/ do is direct Jenkins to clone/update the source in such
a way that it's updating to the same changeset from which build 1 was
produced, then run a new build. Theoretically, this will give you an
artifact equivalent to the one built in build 1.

What are you using for source control?

-- Jerry




On Wednesday, December 5, 2012 9:46:14 PM UTC-5, Anba wrote:

    Dear Friends,

    I'm new to CI and Jenkins. Here i want to deploy the old artifacts
    into servers. For example i have done 10 builds and deploy those
    build into servers.

    Here i want select very 1st build and deploy into server(with old
    source code). Is this possible to achieve . if so could please help
    me how to do this.

    I'm using maven,svn,weblogic for my J2ee project.

    Thanks
    Anba


Reply via email to