Answers: <p>There's a simple two step process...</p>
  <p>In your originating job, tick step <code>[ X ] Archive the artifacts</code> and set the files to archive.
  <a href="https://i.sstatic.net/DgL7m.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DgL7m.png" alt="archive artifact config" /></a></p>
  <p>The files are copied to the master, stored in the jobs folder tree, under the builds directory for each build, along with the log. (Delete the build and it deletes the artifacts that came from it).</p>
  <p>Install the <a href="https://plugins.jenkins.io/copyartifact/" rel="nofollow noreferrer">Copy Artifact plugin</a>.
  Configure the job accordingly.
  <a href="https://i.sstatic.net/gMGvd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/gMGvd.png" alt="Copy-artifact config" /></a></p>
  <p>Despite the plugin's screenshot example, this is actually a bad practice for artifacts like jars. Those should be properly managed using an artifact repository like <a href="https://www.sonatype.com/nexus/repository-oss" rel="nofollow noreferrer">Nexus</a> or <a href="https://jfrog.com/artifactory/" rel="nofollow noreferrer">JFrog</a>.</p>
  <p>See <a href="https://stackoverflow.com/a/64475906/598141">my response</a> regarding keeping the the Jenkins space under control, managing the build and artifact retention soundly.</p>
  
Answers: CC BY-SA 4.0
Answers: 2020-10-22T09:34:03.267Z
Answers: I saw that plugin before, but I didn't realize I can copy artifacts locally to a folder and mess with them.. thank you!!
Answers: TacB0sS
Answers: CC BY-SA 4.0
Answers: 2020-10-22T08:07:53.523Z
Answers: 2020-10-22T08:46:31.820Z
Answers: 2020-10-22T08:46:31.820Z
Answers: Ian W
Body: <p>Please excuse my non-fluent terminology..</p>
  <p>There is a Jenkins server, master and a few slaves, there is a pipeline job.. let's call it <strong>playground</strong></p>
  <p>I run the job once, I want to save some data somewhere.
  Run the job again, I want to get the data from previous build.</p>
  <ul>
  <li>Given that the Jenkins server is bounded to a VPN</li>
  <li>Given that the Job may run on master or any of the slaves</li>
  <li>Given that the Job deletes the workspace with every build</li>
  </ul>
  <p>I couldn't find a way to save and load the data..</p>
  <p>One plugin that actually do this is the git plugin, that saves the commit id and reads it in the next build for the changelog</p>
  <p>I went through the git plugin code.. I am very confused and cannot figure out how or where it is done!</p>
  <p>Can someone point me in the right direction.</p>
  
Comments: CC BY-SA 4.0
Comments: 2020-10-21T22:12:40.637Z
Comments: the only way i've gotten this to work across _builds_ is by having some shared persistent storage. Can your nodes (agents) mount something like NFS or EFS? Can you access some form of object storage?
Comments: Bruce Becker
Comments: CC BY-SA 4.0
Comments: 2020-10-22T04:38:36.717Z
Comments: Probably I can.. but I wonder how does the git plugin is doing it.. it might hold the answer
Comments: TacB0sS
Tags: <jenkins><jenkins-pipeline><git><jenkins-plugins><github>
Title: Pass information between Jenkins Job builds
UserDisplayName: TacB0sS
ThreadText: # Pass information between Jenkins Job builds
  
  (Asked by: username_0 on 2020-10-21)
  
  Please excuse my non-fluent terminology..
  
  There is a Jenkins server, master and a few slaves, there is a pipeline job.. let's call it **playground**
  
  I run the job once, I want to save some data somewhere.
  Run the job again, I want to get the data from previous build.
  
  * Given that the Jenkins server is bounded to a VPN
  * Given that the Job may run on master or any of the slaves
  * Given that the Job deletes the workspace with every build
  
  I couldn't find a way to save and load the data..
  
  One plugin that actually do this is the git plugin, that saves the commit id and reads it in the next build for the changelog
  
  I went through the git plugin code.. I am very confused and cannot figure out how or where it is done!
  
  Can someone point me in the right direction.
  
  **Tags:** jenkins, jenkins-pipeline, git, jenkins-plugins, github
  
  > **Comments:**
  > **username_1**: the only way i've gotten this to work across _builds_ is by having some shared persistent storage. Can your nodes (agents) mount something like NFS or EFS? Can you access some form of object storage?  
  > **username_0**: Probably I can.. but I wonder how does the git plugin is doing it.. it might hold the answer  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-10-22. Score: 3 | Accepted answer
  
  There's a simple two step process...
  
  In your originating job, tick step `[ X ] Archive the artifacts` and set the files to archive.
  [![archive artifact config](https://i.sstatic.net/DgL7m.png)](https://i.sstatic.net/DgL7m.png)
  
  The files are copied to the master, stored in the jobs folder tree, under the builds directory for each build, along with the log. (Delete the build and it deletes the artifacts that came from it).
  
  Install the [Copy Artifact plugin](https://plugins.jenkins.io/copyartifact/).
  Configure the job accordingly.
  [![Copy-artifact config](https://i.sstatic.net/gMGvd.png)](https://i.sstatic.net/gMGvd.png)
  
  Despite the plugin's screenshot example, this is actually a bad practice for artifacts like jars. Those should be properly managed using an artifact repository like [Nexus](https://www.sonatype.com/nexus/repository-oss) or [JFrog](https://jfrog.com/artifactory/).
  
  See [my response](https://stackoverflow.com/a/64475906/598141) regarding keeping the the Jenkins space under control, managing the build and artifact retention soundly.
  
  > **Comments:**
  > **username_0**: I saw that plugin before, but I didn't realize I can copy artifacts locally to a folder and mess with them.. thank you!!  
  
  ---
  
  