Skip to content

Commit b718fb8

Browse files
authored
feat: Enable configuring Docker resource_class for run job (#512)
* Add code cahnges to enable passing through `resource_class` in `run` job Signed-off-by: Timo Sand <[email protected]> * Add job to test changing resource_class Signed-off-by: Timo Sand <[email protected]> --------- Signed-off-by: Timo Sand <[email protected]>
1 parent fc012be commit b718fb8

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.circleci/test-deploy.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,15 @@ workflows:
129129
cypress-command: "npx cypress run --component --parallel --record"
130130
pre-steps:
131131
- checkout
132+
- cypress/run:
133+
filters: *filters
134+
name: Verify resource_class config works
135+
working-directory: examples/angular-app
136+
cypress-cache-key: cypress-cache-{{ arch }}-{{ checksum "examples/angular-app/package.json" }}
137+
cypress-command: "npx cypress run --component --parallel --record"
138+
resource_class: small
139+
pre-steps:
140+
- checkout
132141
- install-and-persist:
133142
filters: *filters
134143
name: Install & Persist
@@ -177,6 +186,7 @@ workflows:
177186
- Run CT Tests in Firefox
178187
- Run CT Tests in Edge
179188
- Verify skip-checkout
189+
- Verify resource_class config works
180190
context: circleci-orb-publishing
181191
- orb-tools/publish:
182192
name: publish_prod
@@ -202,6 +212,7 @@ workflows:
202212
- Run CT Tests in Firefox
203213
- Run CT Tests in Edge
204214
- Verify skip-checkout
215+
- Verify resource_class config works
205216
context: circleci-orb-publishing
206217
filters:
207218
branches:

src/jobs/run.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ executor:
66
node-version: << parameters.node-version >>
77

88
parallelism: << parameters.parallelism >>
9+
resource_class: << parameters.resource_class >>
910

1011
parameters:
1112
install-command:
@@ -77,6 +78,21 @@ parameters:
7778
type: boolean
7879
default: false
7980
description: Whether to skip code checkout
81+
resource_class:
82+
type: string
83+
default: medium
84+
enum:
85+
- small
86+
- medium
87+
- medium+
88+
- large
89+
- xlarge
90+
- 2xlarge
91+
- 2xlarge+
92+
- arm.medium
93+
- arm.large
94+
- arm.xlarge
95+
- arm.2xlarge
8096

8197
steps:
8298
- install:

0 commit comments

Comments
 (0)