deploying build artifacts from a previous build.

2015-04-07 Thread Colin Kincaid Williams
Hi,

I'm part of a project that is currently using a set of scripts to deploy 
projects manually by providing a build number. The scripts dig through the 
filesystem on the jenkins server, and copy and deploy the files needed in 
place on a host. Unfortunately these simple scripts are a mess. 

 It seems easy enough for me to add a post build step to auto deploy build 
artifacts. However is there a nice way to do similar for previous builds?

 It would be nice to click on the build number and have it execute the a 
task to deploy the build artifacts. I'm looking for some better way to 
integrate this functionality. I do notice the redeploy artifacts has a 
different workflow intended.

I had a look at some of the Jenkins plugins, but didn't see any that 
covered this specific functionality.  Is my approach a terrible hack?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/bb2c9ee9-f384-428f-85f5-2ec0836308f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Deploying build artifacts

2013-08-26 Thread Mateusz PolaƄski
I'm trying to copy artifacts from the concrete build being executed to a
remote directory.
I have tried almost everything to override the basedir, but it still says:
"The basedir path '/home/user/.jenkins/jobs/gh/builds/82' from the workspace
doesn't exist."
I've tried different ways to write the path down, it's always the same.
Does anyone know how to master this issue?



--
View this message in context: 
http://jenkins-ci.361315.n4.nabble.com/Deploying-build-artifacts-tp4676969.html
Sent from the Jenkins users mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Deploying Build Artifacts

2013-07-26 Thread deevant07
Hi David,

I have tried the way you explained for Promoting the old builds but still
not successful. I am not sure where i am missing the configuration.

Can you please provide me the detailed steps(Plugin wise) to create a job
that can promote the older builds?

My requirement is as follows.

1. I have the QA build say 12 deployed.
2. Due to some reason i want to revert back to build 11.

Currently when i go to the particular build and run promotion its picking
the latest artifacts as the target folder is from workspace rather than the
build folder.

Thanks in Advance,
Deevan





--
View this message in context: 
http://jenkins-ci.361315.n4.nabble.com/Deploying-Build-Artifacts-tp4636960p4674653.html
Sent from the Jenkins users mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Deploying Build Artifacts

2012-08-03 Thread cjo
The artefacts are not in the workspace, they are stored with the build 
information,
so you can retrieve artifacts from all of the builds that have them stored, 
from build#1 to latest if you keep them that long.

these are easily accessed  from the webUI via 
/job///artifact/

The default file path of these is 
/jobs//builds//artifact/
however you should not be using this as you can move the directory that the 
builds are stored in.

And all that the copy artifact plugin is doing is getting them from that 
location and adding them to the current workspace, so that they can be used 
in further buildsteps without any hardcoded paths.


The reason for the different PROMOTED_xxx env variables is that the 
promotion is a project in it own right, so the variables that are not 
prefixed, are those of the promotion build itself, and these will change if 
a promotion is re-ran. but the PROMOTED_xxx one will not as they will still 
indicate the parent build being promoted.


PS. the NODE_LABELS + NODE_NAME might not be available as the promotion 
process might run on a different slave or maybe the master.


On Friday, August 3, 2012 5:23:15 PM UTC+1, qazwart wrote:
>
> On Fri, Aug 3, 2012 at 11:32 AM, cjo  wrote: 
> > As you have the deploying part already configured in the promotion, 
> > 
> > All that you need to do is retrieve the artefacts from the build that 
> you 
> > need, in to the current workspace, 
> > This is done with the Copy Artifact Plugin[1] before your deploy 
>
> I'm not sure how the Copy Artifact Plugin will do any good. The 
> problem is the artifacts I want aren't in the workspace or easily 
> available. What I did figure out is that I do know where the artifacts 
> are located, and I could specify that directory. 
>
> Yeah, I ran into the problem that BUILD_ID and JOB_NAME are no longer 
> the standard Jenkins job name and build id. The promotion build plugin 
> took them over. There's no documentation in the plugin itself, but it 
> is on the Wiki (which I didn't see until you pointed them out. What I 
> did do is print out all the environment variables and discovered them. 
> There are six of them: 
>
> PROMOTED_ID: old BUILD_ID 
> PROMOTED_JOB_NAME: old JOB_NAME 
> PROMOTED_NUMBER: old BUILD_NUMBER 
> PROMOTED_SVN_REVISION: old SVN_REVISION 
> PROMOTED_SVN_URL: old SVN_URL 
> PROMOTED_URL: old BUILD_URL 
>
> The following have been taken over by the promotion plugin: 
>
> BUILD_ID: (Now the promotion ID) 
> BUILD_NUMBER: (Now the promotion number) 
> BUILD_TAG (Now 
> "jenkins--promotion-- #> 
> BUILD_URL (Now URL to promotion) 
> JOB_URL (Now the promotion root URL) 
>
> The following are no longer defined: 
> SVN_REVISION 
> SVN_URL 
>
> I have no idea what happens to the NODE_LABELS and NODE_NAME, but I 
> assume these have been replaced by the promotion plugin. 
>
> Hope this helps those who need this plugin. 
>
> -- 
> David Weintraub 
> qazw...@gmail.com 
>


Re: Deploying Build Artifacts

2012-08-03 Thread David Weintraub
On Fri, Aug 3, 2012 at 11:32 AM, cjo  wrote:
> As you have the deploying part already configured in the promotion,
>
> All that you need to do is retrieve the artefacts from the build that you
> need, in to the current workspace,
> This is done with the Copy Artifact Plugin[1] before your deploy

I'm not sure how the Copy Artifact Plugin will do any good. The
problem is the artifacts I want aren't in the workspace or easily
available. What I did figure out is that I do know where the artifacts
are located, and I could specify that directory.

Yeah, I ran into the problem that BUILD_ID and JOB_NAME are no longer
the standard Jenkins job name and build id. The promotion build plugin
took them over. There's no documentation in the plugin itself, but it
is on the Wiki (which I didn't see until you pointed them out. What I
did do is print out all the environment variables and discovered them.
There are six of them:

PROMOTED_ID: old BUILD_ID
PROMOTED_JOB_NAME: old JOB_NAME
PROMOTED_NUMBER: old BUILD_NUMBER
PROMOTED_SVN_REVISION: old SVN_REVISION
PROMOTED_SVN_URL: old SVN_URL
PROMOTED_URL: old BUILD_URL

The following have been taken over by the promotion plugin:

BUILD_ID: (Now the promotion ID)
BUILD_NUMBER: (Now the promotion number)
BUILD_TAG (Now "jenkins--promotion--
BUILD_URL (Now URL to promotion)
JOB_URL (Now the promotion root URL)

The following are no longer defined:
SVN_REVISION
SVN_URL

I have no idea what happens to the NODE_LABELS and NODE_NAME, but I
assume these have been replaced by the promotion plugin.

Hope this helps those who need this plugin.

--
David Weintraub
qazw...@gmail.com


Re: Deploying Build Artifacts

2012-08-03 Thread cjo
As you have the deploying part already configured in the promotion, 

All that you need to do is retrieve the artefacts from the build that you 
need, in to the current workspace, 
This is done with the Copy Artifact Plugin[1] before your deploy

You should set the project to $PROMOTED_JOB_NAME, and "Which build" to 
"Specific build" with $PROMOTED_NUMBER being the build number.
These are added by the promote plugin so that you can see the job and build 
that is being promoted.
See the wiki on this [2]

Make sure you artifact the needed file in the main job, and when you 
promote build #20 it will copy those artifacts into the workspace and 
deploy those rather than the latest in the workspace.

[1] https://wiki.jenkins-ci.org/display/JENKINS/Copy+Artifact+Plugin
[2] https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin 

Chris.



On Friday, August 3, 2012 3:32:02 PM UTC+1, qazwart wrote:
>
> We are using Maven (actually Ant and Ivy, but I'm converting the 
> ivy.xml to a Maven pom.xm).  I store the pom.xml and the jar/war/ear 
> I'm deploying as a "Build Artifact". I have figured out how to use the 
> Promotion Plugin to deploy the artifact into our Maven repository when 
> I press the button to promote the build. 
>
> Let's say I did build #20, and that went to QA. QA is happy with the 
> build and officially approves it. We want to go ahead and use the 
> Promotion plugin to deploy the artifacts from Build #20 to our Maven 
> repository. Unfortunately, we now are on Build #27, so the artifacts 
> we want to deploy are no longer in the working directory. 
>
> Is there a way to promote the artifacts from Build #20 even though it 
> is not the latest build? 
>
> -- 
> David Weintraub 
> qazw...@gmail.com 
>


Deploying Build Artifacts

2012-08-03 Thread David Weintraub
We are using Maven (actually Ant and Ivy, but I'm converting the
ivy.xml to a Maven pom.xm).  I store the pom.xml and the jar/war/ear
I'm deploying as a "Build Artifact". I have figured out how to use the
Promotion Plugin to deploy the artifact into our Maven repository when
I press the button to promote the build.

Let's say I did build #20, and that went to QA. QA is happy with the
build and officially approves it. We want to go ahead and use the
Promotion plugin to deploy the artifacts from Build #20 to our Maven
repository. Unfortunately, we now are on Build #27, so the artifacts
we want to deploy are no longer in the working directory.

Is there a way to promote the artifacts from Build #20 even though it
is not the latest build?

-- 
David Weintraub
qazw...@gmail.com