Commit e4e4881
authored
ci: docker e2e test default to local build (#2383)
# Pull Request: Use Local Docker Build for E2E Tests by Default
## Summary
This PR modifies the Docker E2E testing framework to use locally built
Docker images by default instead of attempting to pull from
`ghcr.io/rollkit/rollkit`. This resolves issues where developers
encounter "pull access denied" errors when running Docker E2E tests
locally.
## Benefits
1. __Developer Experience__: Eliminates "pull access denied" errors for
local development
2. __Self-Contained Testing__: Tests use the current codebase instead of
potentially outdated registry images
3. __Automatic Cleanup__: Prevents accumulation of test images in the
local Docker environment
4. __CI/CD Compatibility__: Maintains ability to override image
repository and tag for production environments
## Usage
### Local Development (Default)
```bash
make test-docker-e2e
```
This will automatically:
- Build the Docker image as `rollkit:local-dev`
- Run the Docker E2E tests
- Clean up the image after tests complete
### CI/CD (Override)
```bash
ROLLKIT_IMAGE_REPO=ghcr.io/rollkit/rollkit ROLLKIT_IMAGE_TAG=v1.0.0 make test-docker-e2e
```
## Testing
- Verified that `make test-docker-e2e` builds the image locally and runs
tests successfully
- Confirmed that environment variable overrides still work for CI/CD
scenarios
- Tested cleanup functionality to ensure images are properly removed
after tests
## Breaking Changes
None. This change only affects the default behavior for local
development. All existing CI/CD configurations using environment
variables will continue to work unchanged.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added a Makefile target to build a local Docker image for development
and testing.
- Introduced a composite test target to run both unit and Docker-based
end-to-end tests with a single command.
- **Improvements**
- Enhanced Docker-based end-to-end test workflow to use a locally built
image by default and clean up after tests.
- Updated environment variable handling in test workflows for better
local development support.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 4ee6b80 commit e4e4881
4 files changed
Lines changed: 47 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
69 | 78 | | |
70 | | - | |
| 79 | + | |
71 | 80 | | |
72 | 81 | | |
73 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
| |||
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
43 | | - | |
| 48 | + | |
44 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
45 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
238 | | - | |
| 239 | + | |
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
243 | | - | |
| 244 | + | |
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
| |||
0 commit comments