-
-
Notifications
You must be signed in to change notification settings - Fork 1
Using wip in CI
wip is built for interactive development, but nothing stops it running unattended — provided you account for the absence of a TTY and the absence of anyone to answer a prompt.
Note: CI runners rarely have WSL2 and WSLC available. In practice most projects run their tests on plain Docker in CI and use wip locally. This page is for the cases where you do have a WSLC-capable runner (a self-hosted Windows/WSL2 machine, for example).
wip only allocates a TTY when both stdin and stdout are real TTYs. In CI neither is, so nothing
is allocated even for commands configured interactive: true. You don't need --no-interactive —
though passing it is harmless and documents the intent:
wip exec --no-interactive bundle exec rspecSee TTY Allocation.
wip exits with the child's exit code, so a failing test suite fails the step:
| Code | Meaning |
|---|---|
0 |
success |
1 |
wip-level failure (ConfigError, wip doctor found a [FAIL]) |
127 |
the resolved binary couldn't be executed |
130 |
interrupted |
128 + N |
killed by signal N
|
| other | passed through from the child |
set -euo pipefail
wip version # record versions in the log
wip doctor # exits 1 on any [FAIL]
wip build --no-cache
wip up -d
wip exec --no-interactive bundle exec rspec
wip downwip doctor as a gate is worth it: it turns "the container silently didn't have what it needed"
into an explicit failure with a message.
wip up --watch and wip sync --watch are foreground loops that never exit. A CI step running one
hangs until the job times out. Use wip up -d and wip sync (one-shot) instead.
Containers outlive the process. On a self-hosted runner they'll still be there next build:
trap 'wip down || true' EXITUse --config and --env-file rather than mutating files in place:
wip --config ci/wip.yml --env-file ci/.env up -dSee Global Options.
Pass them through the environment or an --env-file written at runtime, never a committed
wip.yml. Remember wip config's masking is a key-name heuristic — don't dump config into a
public build log without reading it. See Secret Masking.
wslc registry login -u "$REGISTRY_USER" ghcr.io
wip up -dwip up -d --debug --debug-log=---debug-log=- forces resource snapshots inline rather than into a temp file you'd have to hunt
for afterwards. See Debug Output.
Usually unnecessary — a CI checkout is a one-shot copy, and the slow-boot problem sync solves is about repeated interactive boots. If you do use it, note:
-
wip upmirrors once before boot anyway; no watcher needed. -
--no-syncskips even that, if the image already contains the source. - Under
sync.mode: exec, rsync must exist in the app image.
Container and network names come from wip.yml, so two jobs on the same runner will collide.
Isolate with per-job config:
export JOB_ID="${CI_JOB_ID}"
wip --config "ci/wip-${JOB_ID}.yml" up -dUnder compose-native, compose.project names the network, so varying it per job is enough to keep
networks apart — container names still come from service names, so you'll want distinct configs
regardless.
- TTY Allocation
- Global Options
- wip doctor
- CLI Command Reference — the exit code table
Introduction
Modes
Configuration
- Configuration Reference
- Config File Discovery
- Dependencies
- Networking
- Interactions
- Restart Policies
- Env Files
- Secret Masking
- Dockerignore
- Shadow Build Context
- Source Sync
- Sync Modes
compose.yml support
- Compose File Support
- Compose Build
- Compose Depends On
- Compose Profiles
- Compose Variable Interpolation
Commands
- CLI Command Reference
- wip init
- wip version
- wip doctor
- wip config
- wip build
- wip up
- wip stop
- wip down
- wip exec
- wip run
- wip shell
- wip logs
- wip sync
- wip dispatch
- Global Options
- Debug Output
- TTY Allocation
Guides
- Guides
- Migrating from dip
- Reusing an Existing compose.yml
- Fixing a Slow Boot
- Continuous Sync
- Auto Restarting Containers
- Multi Arch Images
- Using wip in CI
Troubleshooting
- Troubleshooting & FAQ
- FAQ
- Configuration Errors
- WSLC Not Found
- Registry Authentication
- Architecture Mismatch
- Volume Limit Reached
- rsync Not Found
- Reporting Issues
Comparison
Project