From b21ac739a57580616ea10cab6c8bf0cf28fbeadc Mon Sep 17 00:00:00 2001 From: Isaac Riceweber Date: Mon, 7 Nov 2022 08:40:13 -0800 Subject: [PATCH] feat: parameterize tags for CircleCI images (#171) Co-authored-by: Isaac Riceweber Co-authored-by: Eric Ribeiro --- src/executors/default.yml | 2 +- src/jobs/continue.yml | 8 +++++++- src/jobs/pack.yml | 7 +++++++ src/jobs/publish.yml | 7 +++++++ src/jobs/review.yml | 8 +++++++- 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/executors/default.yml b/src/executors/default.yml index ec278cce..6b280883 100644 --- a/src/executors/default.yml +++ b/src/executors/default.yml @@ -9,7 +9,7 @@ parameters: What version of the CircleCI CLI Docker image? For full list, see https://hub.docker.com/r/circleci/circleci-cli/tags resource_class: - description: Configure the xecutor resource class + description: Configure the executor resource class type: enum enum: ["small", "medium", "medium+", "large", "xlarge", "2xlarge", "2xlarge+"] default: "medium" diff --git a/src/jobs/continue.yml b/src/jobs/continue.yml index bc6590b3..a047d410 100644 --- a/src/jobs/continue.yml +++ b/src/jobs/continue.yml @@ -2,7 +2,7 @@ description: | After the "publish-dev" job has completed along with any other preliminary checks, this job will trigger the next workflow (test-deploy) in the Orb Development Kit. docker: - - image: cimg/base:current + - image: cimg/base:<< parameters.tag >> resource_class: << parameters.resource_class >> parameters: @@ -34,6 +34,12 @@ parameters: type: enum enum: ["small", "medium", "medium+", "large", "xlarge", "2xlarge", "2xlarge+"] default: "medium" + tag: + type: string + default: "current" + description: | + By default the most current stable release of `cimg/base` image will be used, but you may statically set the image tag with this parameter. + https://circleci.com/developer/images/image/cimg/base steps: - checkout diff --git a/src/jobs/pack.yml b/src/jobs/pack.yml index 0a6e6fe1..7adb5983 100644 --- a/src/jobs/pack.yml +++ b/src/jobs/pack.yml @@ -20,10 +20,17 @@ parameters: description: Host URL of CircleCI API. If you are using self-hosted CircleCI, this value should be set. type: string default: https://circleci.com + tag: + type: string + default: "latest" + description: > + What version of the CircleCI CLI Docker image? For full list, see + https://hub.docker.com/r/circleci/circleci-cli/tags executor: name: default resource_class: << parameters.resource_class >> + tag: << parameters.tag >> steps: - checkout diff --git a/src/jobs/publish.yml b/src/jobs/publish.yml index a26e3356..f26b2451 100644 --- a/src/jobs/publish.yml +++ b/src/jobs/publish.yml @@ -5,6 +5,7 @@ description: | executor: name: default resource_class: << parameters.resource_class >> + tag: << parameters.tag >> parameters: resource_class: @@ -66,6 +67,12 @@ parameters: - dev - production default: "dev" + tag: + type: string + default: "latest" + description: > + What version of the CircleCI CLI Docker image? For full list, see + https://hub.docker.com/r/circleci/circleci-cli/tags steps: - attach_workspace: diff --git a/src/jobs/review.yml b/src/jobs/review.yml index 34d4d905..85f9984d 100644 --- a/src/jobs/review.yml +++ b/src/jobs/review.yml @@ -26,9 +26,15 @@ parameters: Commands longer than this will fail the review. type: integer default: 64 + tag: + type: string + default: "current" + description: | + By default the most current stable release of `cimg/base` image will be used, but you may statically set the image tag with this parameter. + https://circleci.com/developer/images/image/cimg/base docker: - - image: cimg/base:current + - image: cimg/base:<< parameters.tag >> resource_class: << parameters.resource_class >> steps: