From ceb0383ed3c5b425a7dca94eaed22d26de161717 Mon Sep 17 00:00:00 2001 From: Jenny Miggin <40723813+jenny-miggin@users.noreply.github.com> Date: Tue, 20 Dec 2022 21:21:44 +0000 Subject: [PATCH] feat: add configurable resource classes (#170) * add configurable resource classes * format rc type Co-authored-by: Jenny Miggin Co-authored-by: Kyle a.k.a. TechSquidTV <33272306+KyleTryon@users.noreply.github.com> --- src/executors/default.yml | 13 +++++++++++++ src/jobs/run.yml | 13 +++++++++++++ src/jobs/test.yml | 13 +++++++++++++ 3 files changed, 39 insertions(+) diff --git a/src/executors/default.yml b/src/executors/default.yml index 19dd780..66955d0 100644 --- a/src/executors/default.yml +++ b/src/executors/default.yml @@ -9,6 +9,19 @@ parameters: description: > Pick a specific cimg/node image version tag: https://hub.docker.com/r/cimg/node + resource_class: + type: enum + default: large + description: Configure the executor resource class + enum: + - small + - medium + - medium+ + - large + - xlarge + - 2xlarge + - 2xlarge+ docker: - image: cimg/node:<> +resource_class: << parameters.resource_class >> diff --git a/src/jobs/run.yml b/src/jobs/run.yml index b27a48c..9bb858f 100644 --- a/src/jobs/run.yml +++ b/src/jobs/run.yml @@ -38,10 +38,23 @@ parameters: Optionally supply a custom package installation command, with any additional flags needed. type: string default: '' + resource_class: + default: large + description: Configure the executor resource class + enum: + - small + - medium + - medium+ + - large + - xlarge + - 2xlarge + - 2xlarge+ + type: enum executor: name: default tag: << parameters.version >> + resource_class: << parameters.resource_class >> steps: - checkout diff --git a/src/jobs/test.yml b/src/jobs/test.yml index d98b26e..a54e997 100644 --- a/src/jobs/test.yml +++ b/src/jobs/test.yml @@ -48,10 +48,23 @@ parameters: Testing framework your project uses. If this is set to jest or mocha, test results will be automatically produced. When using jest, the jest-junit package is required as a dev dependency. See https://github.com/jest-community/jest-junit for more information. When using mocha, the mocha-junit-reporter and mocha-multi packages are required as dev dependency. See https://github.com/michaelleeallen/mocha-junit-reporter and https://github.com/glenjamin/mocha-multi for more information. + resource_class: + default: large + description: Configure the executor resource class + enum: + - small + - medium + - medium+ + - large + - xlarge + - 2xlarge + - 2xlarge+ + type: enum executor: name: default tag: << parameters.version >> + resource_class: << parameters.resource_class >> steps: - checkout