Compare commits

..

No commits in common. "ec9be23afea33d812ee6edbd42e94db0d3c507ca" and "39ce4f9ee94c1b1eb7dc0679085c1449d087ab0c" have entirely different histories.

3 changed files with 16 additions and 28 deletions

View File

@ -24,11 +24,6 @@ jobs:
- name: Build .jar with Maven
run: ./mvnw package spring-boot:repackage
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: jar-artifact
path: target/*.jar
build-image:
runs-on: ubuntu-22.04
steps:
@ -45,28 +40,24 @@ jobs:
tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin -y
- name: Checkout
uses: actions/checkout@v4
- name: Download .jar Artifact
uses: actions/download-artifact@v3
with:
name: jar-artifact
- name: (Optional) List files and path in the repository
run: |
ls -la
pwd
- name: Build Docker image
run: docker build -t walzen665/spring-cicd-test:latest --build-arg="JAR_FILE=demo-0.0.1-SNAPSHOT-spring-boot.jar" .
run: docker build -t walzen665/spring-cicd-test:latest --build-arg="JAR_FILE=target/demo-0.0.1-SNAPSHOT-spring-boot.jar" .
- name: Tag Docker image
run: docker tag walzen665/spring-cicd-test:latest git.walzen665.de/walzen665/spring-cicd-test:latest
- name: Log in to Gitea Docker Registry
run: echo ${{ secrets.GITEAREGISTRYTOKEN }} | docker login -u ${{ secrets.GITEAREGISTRYUSERNAME }} --password-stdin https://git.walzen665.de
push-image:
runs-on: ubuntu-22.04
steps:
- name: Push Docker Image to Gitea
run: docker push git.walzen665.de/walzen665/spring-cicd-test:latest
collect-artifacts:
runs-on: ubuntu-22.04
steps:
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: artifacts
path: target/*.jar

View File

@ -3,11 +3,8 @@
This is a sample project to demonstrate CI/CD using Gitea and Gitea Runner.
## Details
The configured Action Pipeline builds a executable .jar file with the help of maven. It contains the basic Spring Boot WebApp wich serves a simple HTML page with sample text to `localhost:8080/`.
Run actions build a executable .jar file with the help of maven. It contains the basic Spring Boot WebApp wich serves a simple HTML page with sample text to `localhost:8080/`.
This project uploads configured artifacts. Checkout `.gitea/workflows` for more details.
The docker compose files used to setup this System can be found in `files` directory.
### Docker
Now also creates a sample docker package for remote deployment.

View File

@ -8,6 +8,6 @@ public class DemoRestController {
@GetMapping("/")
public String get() {
return "Halloooo!";
return "Halloo!";
}
}