Only downloading upstream materials if the version changes

Follow

Comments

2 comments

  • Avatar
    Rajeshvaran Appasamy

    Hi Brett,


    Instead of using a timer, can you try making the stage as automatically triggered as shown in below example?


       <pipeline name="downstream_pipeline">
    <materials>
    <pipeline pipelineName="upstream_pipeline" stageName="defaultStage" materialName="upstream" />
    </materials>
    <stage name="defaultStage">
    <jobs>
    <job name="defaultJob">
    <tasks>
    <exec command="ls" />
    <fetchartifact pipeline="upstream_pipeline" stage="defaultStage" job="defaultJob" 

                       srcdir="defaultsource">
    <runif status="passed" />
    </fetchartifact>
    </tasks>
    </job>
    </jobs>
    </stage>
    </pipeline>
  • Avatar
    Brett Cave

    The pipeline needs to run hourly.


    I resolved this by changing the upstream pipelines definition. The task of the upstream is a local bash script, called via exec. The bash script now copies the artifact needed by the downstream to a local directory, and the downstream pipeline runs a script that uses the artifact in that directory. no "fetchmaterials" task is required any more.

Please sign in to leave a comment.