Named Artifacts#987

Subscribe to Named Artifacts 4 post(s), 4 voice(s)

 
Avatar jfinlay 1 post #2663

It’s easy to transfer the results of a job to the server via “artifacts”; however

1) it’s a pain to distribute it out to an agent that needs it, ie needing to know pipeline name, job name, yada, meaning a lot of config file back-references and cruise/nant interdependence;
2) if the artifact is a complex directory, transfer requires either zipping/unzipping it, or recursive file move logic in the build file;
3) not knowing which agent will later pick up the artifact, every job in every following stage may need to pick up the artifact every time; and
4) that means each agent likely picking up the same artifact repeatedly.

Could I suggest naming the artifacts? eg

<artifact name="deployed code" dest="no/longer/necessary" src="as/it/is/now/on/the/agent" />
or
<artifact name="dbms" src="as/it/is/now/on/the/agent" />

Then the config for a later job can specify its requirements, eg

<job> <requirements> <requirement name="deployed code" dest="where/to/put/it/on/the/agent" /> <requirement name="dbms" dest="ditto" />

This way cruise could take care of
a) whether the agent needs the artifact;
b) where to get the artifact from;
c) how to transfer it to the agent; and
d) hey, that agent already has the artifact (from a prior job), no need to transfer it again

and my nant script is really clean.

 
Avatar Jez Humble Administrator 108 post(s) #2664

Hey there.

We plan to do exactly that for the next release—you’re right, it is a pain (we have to do it ourselves).

I hadn’t thought of the case where the agent already has the artifact—we probably wouldn’t do that for the first cut, since there are corner cases like when the artifact is created in a different place from where it is needed, or if your script does a “clean”.

Thanks,

Jez.

 
Avatar Pete Mounce 47 post(s) #2681

+1!

 
Avatar Anthony Abate 15 post(s) #2960

+1

ive been scouring the documentation to see how to get a stage to use artifacts. This is especially useful for stages that need manual approval.

In my case, im just using a single agent per pipeline so I try to make sure that I do not trigger the pipeline. Then when i do run the manual stage, there is no need to pull the artifacts since they are left exactly where they were from the previous stage.

There are some obvious drawbacks to this, but it is all I can do until this feature is realized.