Shippable / support

Shippable SaaS customers can report issues and feature requests in this repository
100 stars 28 forks source link

how to pass value from one job to another job #5185

Closed tkumark closed 3 years ago

tkumark commented 3 years ago

I have 2 job. Job A creates loadbalancer and job B deploys ecs task. Job A and Job B are linked so job B will only run after job A.

I am creating a loadbalancer and targetgroup in Job A. In Job B I am deploying an ecs task I would like to pass the targetgroup name created in the previous

  - name: myapp-frontend-dev-elb
    type: loadBalancer
    pointer:
      sourceName: <variable with value defined in Job A>
      method: application
a-murphy commented 3 years ago

If job A is a runSh job, you can use put_resource_state to update the loadBalancer resource as described in http://docs.shippable.com/platform/tutorial/workflow/writing-keyvalues-to-output-resource/. If you need other information provided outside of the loadBalancer resource as well, then it becomes a little more complicated and the solution depends somewhat on job B's type.