Skip to content

Commit

Permalink
Skip restore steps after already preping overlay
Browse files Browse the repository at this point in the history
to avoid needlessly downloading the same overlay cache
  • Loading branch information
ruffsl committed Apr 26, 2023
1 parent f04d43b commit 46673ca
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,21 @@ _commands:
type: string
skip:
type: string
restore:
default: true
type: boolean
build:
default: true
type: boolean
steps:
- store_artifacts:
path: << parameters.workspace >>/lockfile.txt
- restore_from_cache:
key: << parameters.key >>
workspace: << parameters.workspace >>
- when:
condition: << parameters.restore >>
steps:
- restore_from_cache:
key: << parameters.key >>
workspace: << parameters.workspace >>
- when:
condition: << parameters.build >>
steps:
Expand Down Expand Up @@ -380,6 +386,7 @@ _steps:
underlay: /opt/underlay_ws
workspace: /opt/overlay_ws
mixins: ${OVERLAY_MIXINS}
restore: false
restore_overlay_workspace: &restore_overlay_workspace
setup_workspace:
<<: *setup_workspace_overlay
Expand Down

0 comments on commit 46673ca

Please sign in to comment.