Skip to content

Commit

Permalink
Add daily e2e job for refreshing the cache (#19)
Browse files Browse the repository at this point in the history
To refresh the cache we need to checkout ramen source and run drenv cache with
the environment files. Using a workflow for this make this job easy to implement
and manage without accessing the runner directly.

The job can also run manually from github UI. This is likely to work for people
with write access.

Signed-off-by: Sheetal Pamecha <[email protected]>
  • Loading branch information
Sheetalpamecha authored Sep 23, 2024
1 parent 80fb919 commit 385b3f0
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/e2e-daily.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

---
# yamllint disable rule:line-length
name: E2E Daily

on: # yamllint disable-line rule:truthy
# Run every day on 03:00.
schedule:
- cron: '0 3 * * *'
# Allow manual run.
# (Actions -> E2E Daily -> Run workflow)
workflow_dispatch:

jobs:
refresh-cache:
runs-on: [self-hosted, e2e-rdr]
if: github.repository == 'RamenDR/ramen'

steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Install drenv
run: pip install -e test

- name: Refresh cache
uses: nick-fields/retry@v3
with:
timeout_minutes: 2
retry_wait_seconds: 60
max_attempts: 10
command: |
cd test
drenv cache -v envs/regional-dr.yaml

0 comments on commit 385b3f0

Please sign in to comment.