Sha256: b6f40cd733959f2bdde3ea51518a551633a73ae34a730787ab1ae6087db8e395
Contents?: true
Size: 1.2 KB
Versions: 5
Compression:
Stored size: 1.2 KB
Contents
# frozen_string_literal: true common = load('common_pipeline.rb') resource :timer, :time do source[:interval] = '5m' end # Add a timer to the first job get_timer_task = { get: :timer, trigger: true } start_plan = common.jobs.values.first.plan start_plan << get_timer_task merge_components common job 'An extra job that the wrapper pipeline requires' do plan << get_timer_task date = { task: 'print the date', config: { platform: 'linux', image_resource: { type: 'docker-image', source: { repository: 'busybox' } }, run: { path: 'date' } } } plan << date end job 'Goodbye from the Wrapper Pipeline' do |_pipeline| # Get the last job defined in the previous pipeline # so that we can depend on it in this job last_job = common.jobs.values.last last_job.plan.select { |task| task.key? :get }.each do |task| task = task.dup task[:passed] = [last_job] plan << task end task = { task: 'print_outer', config: { platform: 'linux', image_resource: { type: 'docker-image', source: { repository: 'busybox' } }, run: { path: 'echo', args: ['This is the outer pipeline. Good bye!'] } } } plan << task end
Version data entries
5 entries across 5 versions & 1 rubygems