https://github.com/limitium/cicd-demo
Example of usage gradle with spotless and jib. The simplest spring boot http server formatted with spotless, packed in a docker image with jib via github actions and pushed to github packages.
https://github.com/limitium/cicd-demo
github-actions gradle jib spotless springboot
Last synced: 8 months ago
JSON representation
Example of usage gradle with spotless and jib. The simplest spring boot http server formatted with spotless, packed in a docker image with jib via github actions and pushed to github packages.
- Host: GitHub
- URL: https://github.com/limitium/cicd-demo
- Owner: limitium
- Created: 2022-08-02T17:12:46.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-08T11:28:43.000Z (about 3 years ago)
- Last Synced: 2025-01-11T06:33:38.837Z (9 months ago)
- Topics: github-actions, gradle, jib, spotless, springboot
- Language: Java
- Homepage:
- Size: 70.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jib with github packages and spotless example
## Checkstyle
```shell
./gradlew build
```
Will run `:spotlessJavaCheck` task to check code for style violationsCode can be reformated according to style rules via
```shell
./gradlew spotlessApply
```
## Build
Build image locally with docker and push it in local repo
```shell
./gradlew jibDockerBuild
```
Now `limitium/cicd-demo` image is available and can be tested via TestContainers```shell
./gradlew test
```## Publish
Build image w/o docker demon and push tar to ghcr.io
```shell
./gradlew jib \
-Djib.to.image=ghcr.io/limitium/cicd-demo:latest \
-Djib.to.auth.username=limitium \
-Djib.to.auth.password={ghp_TOKEN}
```