Git Product home page Git Product logo

sorry-cypress-run-cleaner's Introduction

sorry-cypress-run-cleaner

A lightweight container that removes old test runs from the Sorry Cypress database via the Sorry Cypress API.

Note: This does not delete anything stored in S3 buckets (or minio etc), you should configure your S3 lifecycle rules to delete objects once expired.

The container is designed to be run regularly in cloud native workflows (eg Argo Workflows, or Tekton), but will run wherever a container can be run.

CI Release

Environment Variables

We pass key information to the container using environment variables.

Environment Variable Type Description
sorry_cypress_api_url string [required] The url of your sorry-cypress API endpoint. Include http:// or https:// where appropriate. If you are running this container within the same cluster as Sorry Cypress (e.g. using Argo Workflows), we strongly suggest you use the internal dns entry for the endpoint to avoid hairpinning. For example http://api-sorry-cypress.sorry-cypress.svc.cluster.local
run_days_to_keep int The number of days to keep Sorry Cypress runs before cleaning them. If omitted, defaults to 100 days.

Docker run example

This example with run against our defined API and keep the last 200 days of Sorry Cypress test runs.

docker run \
-e sorry_cypress_api_url='https://api.sorry-cypress.sendible.com' \
-e run_days_to_keep='200' \
ghcr.io/sendible-labs/sorry-cypress-run-cleaner:stable

Linux crontab example

To execute as a linux cron, wrap your docker run command in a simple shell script and then call the script at the desired interval.

0 22 * * WED /path/to/script.sh

Kubernetes cronjob example

Kubernetes Cronjob Example

Argo Workflows examples

Workflow Examples

We have provided an example workflowTemplate. Deploy this to your cluster in an appropriate namespace for your setup. You can manually trigger this in the usual ways.

If you wish to have it run regularly, the example cronWorkflow will call the workflow template at the defined cron intervals.

sorry-cypress-run-cleaner's People

Contributors

abdullahishs avatar dependabot[bot] avatar renovate[bot] avatar tim-sendible avatar

Stargazers

 avatar  avatar  avatar

Forkers

wandersonlima

sorry-cypress-run-cleaner's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
github-actions
.github/workflows/ci.yaml
  • actions/checkout v3
  • docker/login-action v2
  • docker/build-push-action v3
.github/workflows/release.yaml
  • actions/checkout v3
  • little-core-labs/get-git-tag v3.0.2
  • docker/login-action v2
  • docker/build-push-action v3

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.