This is our discuss in 5xRuby internal channel for add image validation to our blog CI to prevent upload too large image.
Build Docker Image
docker build -t image-validation .
Execute with specify location
docker run --rm -v /app/my-repo:/home/ruby image-validation
If success will return 0 as status code otherwise will return 1
This is design for GitLab CI
| Option | Name | Description |
|---|---|---|
-b | branch | The branch to compare |
-s | size | The max size allowed (kb) |
-w | width | The max width allowed (size) |
Content type
Image
Digest
Size
33.9 MB
Last updated
over 6 years ago
docker pull elct9620/image-validation-example