Hi,
Context: I have two stages in a GoCD pipeline Stage 1: Verify and Build and Stage 2: Deploy, lets say the Build Stage runs some unit tests and builds my software as a JAR File and Stage 2 should build a docker image from this JAR file and push it to a private registry.
Question: How can I pass the jar file from the first stage to the second stage? As I understand the two stages can be executed on different GoCD agents. Should I publish the jar file from Stage 1 as an Artifact? If yes how do I access artifacts from previous stages in my Jobs? Or is there some other way to do so?
I browsed fro the documentation but couldn't really find a way to do that. From the Artifact pages in the docs, it seems like that these artifacts are only there to be published to the outside and not to other GoCD stages/jobs/tasks.
Looking forward to your answers,
Alex