Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(ci): consolidate cached states workflows and scripts #8865

Merged
merged 2 commits into from
Sep 19, 2024
Merged

Commits on Sep 16, 2024

  1. ref(ci): consolidate cached states workflows and scripts

    We've been using multiple approaches to locate and retrieve cached states in GCP. However, this has made it difficult to reuse the same methods across new workflows or different scenarios.
    
    To address this, we've streamlined the process to make it more reusable in other contexts. This change will support deploying instances from both the `main` branch and `release`, simplifying future implementations and speeding up the process.
    
    Changes:
    - Use a single bash script (`gcp-get-cached-disks.sh`) to get cached states names and availability
    - Move script logic from `sub-find-cached-disks.yml` to `gcp-get-cached-disks.sh` and adapt `sub-find-cached-disks.yml` to allow to output available disks and disks names.
    - Simplify parameters usage in `sub-deploy-integration-tests-gcp.yml` and convert the `Find ${{ inputs.test_id }} cached state disk` step into an independent job, to be able to use the `sub-find-cached-disks.yml` reusable workflow
    - Remove repetition in `sub-ci-integration-tests-gcp.yml`
    gustavovalverde committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    66454fe View commit details
    Browse the repository at this point in the history
  2. ref(tests): Use the ZEBRA_CACHED_STATE_DIR env var across tests

    We had a technical debt with some tests using a hardcoded value for the cache directory (`/zebrad-cache`), which generated inconsistency across disks and cached states directories.
    
    Changes:
    - Allow sync tests to use the `ZEBRA_CACHED_STATE_DIR` as the cache directory, if specified
    - Update the `entrypoint.sh` to reflect this change
    - Add the `ZEBRA_CACHED_STATE_DIR` variable to the missing tests in `sub-ci-integration-tests-gcp.yml`, and remove extra parameters to call reusable workflows.
    gustavovalverde committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    b09411b View commit details
    Browse the repository at this point in the history