From 2f742ae3a6ffef3f45cdff9dad7f94f4232401a3 Mon Sep 17 00:00:00 2001 From: Taylor Silva Date: Fri, 1 Oct 2021 15:49:33 -0400 Subject: [PATCH] Add task that prints the date and use the mock resource instead of busybox. avoids downloading an entire image! Signed-off-by: Taylor Silva --- tasks/hello-world.yml | 4 ++-- tasks/print-date.yml | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 tasks/print-date.yml diff --git a/tasks/hello-world.yml b/tasks/hello-world.yml index efe9f18..f9b0d84 100644 --- a/tasks/hello-world.yml +++ b/tasks/hello-world.yml @@ -1,8 +1,8 @@ platform: linux image_resource: - type: registry-image - source: { repository: busybox } + type: mock + source: { mirror_self: true } run: path: echo diff --git a/tasks/print-date.yml b/tasks/print-date.yml new file mode 100644 index 0000000..8ca7db3 --- /dev/null +++ b/tasks/print-date.yml @@ -0,0 +1,9 @@ +platform: linux + +image_resource: + type: mock + source: { mirror_self: true } + +run: + path: date + args: ["+%Y-%m-%d"]