Materials at the Stage level#850

Subscribe to Materials at the Stage level 2 post(s), 2 voice(s)

 
Avatar Chris Briese... 11 post(s) #2265

I might be missing something here, but I wanted to ask about the ability to have different materials for different stages in a pipeline.
Let’s say I have a dev stage which compiles and unit tests the code. Then I have a manual deployToQA stage that will use the artifacts of the dev stage, but also uses a deploy script, deploy.sh, for its job. I want to keep my deploy.sh in svn, but the agent that is meant to run the script needs only one file from svn, which is deploy.sh. Seems like currently this deployment agent will have to get a lot of junk it doesn’t need just to update one file.
So, from the config perspective:
This: <stage name="devStage"> <materials> <svn username="" url="http://svn-repos/trunk/" password="" /> </materials> <jobs> ... </jobs> <approval /> </stage> <stage name="deploytoQA"> <materials> <svn username="" url="http://svn-repos/trunk/scripts/deploy.sh" password="" /> </materials> <jobs> ... </jobs> </stage>

Instead of this:
<pipelines> <pipeline name="DoStuff" labeltemplate="1.2.${COUNT}"> <materials> <svn username="" url="http://svn-repos/trunk/" password="" /> </materials> ...
</pipelines>

Is this on the TODO list, or is there another recommended way to workaround this issue? Basically, I want to avoid having raw code in any form or any directory on a QA box.

Chris

 
Avatar Chris Stevenson Administrator 27 post(s) #2267

Hey Chris,

At the moment every pipeline must have materials, and the materials are shared across the whole pipeline. We don’t want to have separate materials for each stage, since this would mean that it is no longer possible to tie the whole pipeline to a single set of changes. We are looking at ways to support what you want in a single pipeline, since it is a very common use case. I think it may even emerge as a good practice to have only the first couple of stages do a checkout and from then on use the deployment artifacts generated in the first stage.

You can work around this by using dependencies. You can have a separate deployment pipeline that is triggered from the stage that builds the deployment artifacts. Then that stage can pick up just the artifacts for deployment. I have done this by having a separate small scm checkout that just contains the deployment scripts and downloads the artifacts from the artifacts repository.

Help on Dependencies