Skip to content

Commit

Permalink
feat: add configurable resource classes (#170)
Browse files Browse the repository at this point in the history
* add configurable resource classes

* format rc type

Co-authored-by: Jenny Miggin <[email protected]>
Co-authored-by: Kyle a.k.a. TechSquidTV <[email protected]>
  • Loading branch information
3 people authored Dec 20, 2022
1 parent 22cfc0e commit ceb0383
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/executors/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:<<parameters.tag>>
resource_class: << parameters.resource_class >>
13 changes: 13 additions & 0 deletions src/jobs/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions src/jobs/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ceb0383

Please sign in to comment.