Passing Files between Stages

1,344 views
Skip to first unread message

Alexander Partsch

unread,
Feb 13, 2017, 5:50:24 AM2/13/17
to go-cd
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

Ankit Srivastava

unread,
Feb 13, 2017, 6:39:57 AM2/13/17
to go...@googlegroups.com
Hi Alex,

You can achieve this by creating a fetch artifact task in stage 2.

Here are some useful help links which may help.

Thanks,
Ankit

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

Alexander Partsch

unread,
Feb 13, 2017, 7:44:37 AM2/13/17
to go-cd
Thanks for the info 👍🏻
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.

David Rice

unread,
Feb 13, 2017, 9:06:25 AM2/13/17
to go...@googlegroups.com
As it sounds like you are new to GoCD, you might also want to checkout part 2 of the GoCD getting started documentation.

To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages