Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion orbs/shared/commands/setup_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ parameters:
description: Skips restoring the cache in case a clean slate is needed.
type: boolean
default: true
restore_e2e_cache:
description: >-
Restore the e2e daily cache containing asdf/mise tool installs.
Use for machine executor jobs that need tool binaries.
type: boolean
default: false
checkout_method:
description: checkout method per https://circleci.com/docs/reference/configuration-reference/#checkout
type: enum
Expand All @@ -37,7 +43,13 @@ steps:
steps:
- restore_cache:
keys:
- v2-daily-cache-{{ arch }}-
- v1-daily-cache-{{ arch }}-
- when:
condition: << parameters.restore_e2e_cache >>
steps:
- restore_cache:
keys:
- v1-e2e-daily-cache-{{ arch }}-
# Adds a github org scoped SSH key to the project added by Wheatley
- add_ssh_keys
- when:
Expand Down
1 change: 1 addition & 0 deletions orbs/shared/jobs/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ resource_class: << parameters.resource_class >>
steps:
- setup_environment:
machine: true
restore_e2e_cache: true
- run:
name: Run E2E Tests
command: KUBECONFIG="$HOME/.outreach/kubeconfig.yaml" make e2e
Expand Down
13 changes: 9 additions & 4 deletions orbs/shared/jobs/save_cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ steps:
steps:
- restore_cache:
keys:
- v2-toggle-daily-cache-{{ arch }}-{{ .Revision }}
- v1-toggle-daily-cache-{{ arch }}-{{ .Revision }}
- run:
name: Check cache flag
command: |
Expand All @@ -77,15 +77,20 @@ steps:
- run:
name: Run tests
command: make test
# Daily cache restored by all jobs (Docker and machine executors)
- save_cache:
key: v2-daily-cache-{{ arch }}-{{ epoch }}
key: v1-daily-cache-{{ arch }}-{{ epoch }}
paths:
- "~/.cache"
- "~/.asdf"
- "~/.outreach/.cache"
# E2E cache with asdf/mise tool installs for machine-executor jobs
- save_cache:
key: v1-e2e-daily-cache-{{ arch }}-{{ epoch }}
paths:
- "~/.asdf"
- "~/.local/share/mise"
- save_cache:
key: v2-toggle-daily-cache-{{ arch }}-{{ .Revision }}
key: v1-toggle-daily-cache-{{ arch }}-{{ .Revision }}
paths:
- "~/cache-toggle"

Expand Down