tilt-dev / tilt-dev/tilt

feature request: option for `tilt ci` to clean up after itself

Open
#4,294 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
10.1k
Forks
413
Avg merge
1d 10h
Merged PRs (30d)
6

Description

Describe the Feature You Want

To run tilt ci, have it verify all resources pass, and then clean up after itself (basically tilt down)

Current Behavior

tilt ci runs all resources and then leaves them running when it exits. Users can get the desired behavior tilt ci && tilt down.

Why Do You Want This?

tilt ci && tilt down isn't quite as good as the requested feature since each tilt invocations executes the Tiltfile, which:

  1. can generate a lot of annoying output
  2. can take a while to run (though hopefully generally doesn't)
  3. can have side effects (though hopefully generally doesn't)

Additional context
It's easy to think of two general workflows for tilt ci:

  1. tilt ci to spin up your resources, and then run external integration tests against them
  2. define all your tests in Tilt, tilt ci to spin up your resources, verify your tests pass against them

Encouraging users to move tests into Tilt seems good, and having Tilt clean up after itself also seems good.

This is very similar to #2427, but I'm filing this specifically to focus on the workflow of using tilt to run tests in ci.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing tilt ci and tilt down command entry points and how the Tiltfile is evaluated. Compare the two requested workflows and the related issue #2427, then define the cleanup behavior and its failure cases. Done means tilt ci can verify resources and clean them up without requiring a second Tilt invocation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
ci-cd, cli, devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.