Skip to content

Commit 02f3862

Browse files
committed
build: persist/attach workspace for workflow
1 parent 2a52db4 commit 02f3862

10 files changed

+32
-53
lines changed

src/jobs/std/std_build.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ executor: << parameters.executor >>
55
working_directory: /home/circleci/code
66
steps:
77
- std_checkout
8-
- std_restore_cache:
9-
cache_name: node
10-
use_lockfile: true
11-
- std_restore_cache:
12-
cache_name: build
8+
- attach_workspace:
9+
at: .
1310
- run:
1411
name: Build
1512
command: |
@@ -23,6 +20,7 @@ steps:
2320
- store_artifacts:
2421
path: /tmp/openapi-schemas
2522
destination: /
26-
- std_save_cache:
27-
cache_name: build
28-
path: /home/circleci/code/.turbo/cache
23+
- persist_to_workspace:
24+
root: .
25+
paths:
26+
- .turbo/cache

src/jobs/std/std_docker_publish.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@ environment:
1010
steps:
1111
- setup_remote_docker
1212
- std_checkout
13-
- std_restore_cache:
14-
cache_name: node
15-
use_lockfile: true
16-
- std_restore_cache:
17-
cache_name: build
13+
- attach_workspace:
14+
at: .
1815
- run:
1916
name: Docker Publish
2017
command: |

src/jobs/std/std_install_node_and_yarn_cache.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,8 @@ steps:
4343
cache_name: node
4444
path: /home/circleci/code/node_modules
4545
use_lockfile: true
46+
- persist_to_workspace:
47+
root: .
48+
paths:
49+
- .yarn/cache
50+
- node_modules

src/jobs/std/std_lint.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ executor: << parameters.executor >>
55
working_directory: /home/circleci/code
66
steps:
77
- std_checkout
8-
- std_restore_cache:
9-
cache_name: node
10-
use_lockfile: true
11-
- std_restore_cache:
12-
cache_name: lint
8+
- attach_workspace:
9+
at: .
1310
- run:
1411
name: Run Linting
1512
command: |
@@ -19,7 +16,3 @@ steps:
1916
destination: lint.report.xml
2017
- store_test_results:
2118
path: reports/lint.report.xml
22-
- std_save_cache:
23-
cache_name: lint
24-
path: /home/circleci/code/.eslintcache
25-
path_2: /home/circleci/code/node_modules/.cache/prettier

src/jobs/std/std_sonarcloud_scan.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ executor: << parameters.executor >>
55
working_directory: /home/circleci/code
66
steps:
77
- std_checkout
8-
- std_restore_cache:
9-
cache_name: node
10-
use_lockfile: true
8+
# is this needed here?
119
- attach_workspace:
12-
at: /home/circleci/code
10+
at: .
1311
- sonarcloud/scan:
1412
cache_version: 1

src/jobs/std/std_test_dependencies.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ executor: << parameters.executor >>
55
working_directory: /home/circleci/code
66
steps:
77
- std_checkout
8-
- std_restore_cache:
9-
cache_name: node
10-
use_lockfile: true
11-
- std_restore_cache:
12-
cache_name: build
8+
- attach_workspace:
9+
at: .
10+
# TODO: should check if this gets layered with above or obliterates
11+
# may just want to utilize remote turbocaching
1312
- std_restore_cache:
1413
cache_name: test-dependencies
1514
- run:

src/jobs/std/std_test_integration.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ working_directory: /home/circleci/code
66
steps:
77
- setup_remote_docker
88
- std_checkout
9-
- std_restore_cache:
10-
cache_name: node
11-
use_lockfile: true
12-
- std_restore_cache:
13-
cache_name: build
9+
- attach_workspace:
10+
at: .
1411
- std_restore_cache:
1512
cache_name: vitest-integration
1613
- run:
@@ -23,8 +20,9 @@ steps:
2320
path: sonar
2421
- store_test_results:
2522
path: integration.report.xml
23+
# i don't see any jobs that require this one, do we need to persist? Does another job use these artifacts in the same workflow?
2624
- persist_to_workspace:
27-
root: /home/circleci/code
25+
root: .
2826
paths:
2927
- sonar/integration-coverage
3028
- std_save_cache:

src/jobs/std/std_test_openapi_schema.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ working_directory: /home/circleci/code
66
steps:
77
- setup_remote_docker
88
- std_checkout
9+
- attach_workspace:
10+
at: .
911
- std_clone_repo:
1012
repo_name: openapi-schemas
1113
directory: schemas
1214
branch: master
13-
- std_restore_cache:
14-
cache_name: node
15-
use_lockfile: true
16-
- std_restore_cache:
17-
cache_name: build
1815
- run:
1916
name: Restore OpenAPI Schemas
2017
working_directory: /home/circleci/schemas

src/jobs/std/std_test_types.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ executor: << parameters.executor >>
55
working_directory: /home/circleci/code
66
steps:
77
- std_checkout
8-
- std_restore_cache:
9-
cache_name: node
10-
use_lockfile: true
11-
- std_restore_cache:
12-
cache_name: build
8+
- attach_workspace:
9+
at: .
1310
- std_restore_cache:
1411
cache_name: test-types
1512
- run:

src/jobs/std/std_test_unit.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ executor: << parameters.executor >>
55
working_directory: /home/circleci/code
66
steps:
77
- std_checkout
8-
- std_restore_cache:
9-
cache_name: node
10-
use_lockfile: true
11-
- std_restore_cache:
12-
cache_name: build
8+
- attach_workspace:
9+
at: .
1310
- std_restore_cache:
1411
cache_name: vitest-unit
1512
- run:
@@ -23,7 +20,7 @@ steps:
2320
- store_test_results:
2421
path: unit.report.xml
2522
- persist_to_workspace:
26-
root: /home/circleci/code
23+
root: .
2724
paths:
2825
- sonar/unit-coverage
2926
- std_save_cache:

0 commit comments

Comments
 (0)