-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from fiap-8soat-tc-one/feature/k6-auto-testing
Feature/k6 auto testing
- Loading branch information
Showing
376 changed files
with
120,377 additions
and
3,493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Publish Docker image | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: write | ||
attestations: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up the date and revision tag | ||
id: vars | ||
run: | | ||
DATE_TAG=$(date +'%Y%m%d') | ||
REVISION_TAG=$(cat REVISION_TAG || echo "0") | ||
REVISION_TAG=$((REVISION_TAG + 1)) | ||
echo "${REVISION_TAG}" > REVISION_TAG | ||
echo "TAG=${DATE_TAG}.${REVISION_TAG}" >> $GITHUB_ENV | ||
- name: Set up Docker Build | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push Docker image | ||
id: push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
load: true | ||
tags: | | ||
${{ secrets.DOCKER_USERNAME }}/fiap-8soat-tc:backend-${{ env.TAG }} | ||
${{ secrets.DOCKER_USERNAME }}/fiap-8soat-tc:latest | ||
platforms: linux/amd64 | ||
|
||
- name: Push Docker image (amd64) | ||
run: | | ||
docker push ${{ secrets.DOCKER_USERNAME }}/fiap-8soat-tc:backend-${{ env.TAG }} | ||
docker push ${{ secrets.DOCKER_USERNAME }}/fiap-8soat-tc:latest | ||
- name: Commit revision tag | ||
run: | | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "actions@github.com" | ||
git tag release-${{ env.TAG }} | ||
git push origin release-${{ env.TAG }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ | |
.vscode/ | ||
target/ | ||
code_quality_service/ | ||
.DS_Store | ||
.DS_Store | ||
qodana.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
FROM maven:3.8.4-openjdk-17-slim AS build | ||
|
||
WORKDIR /app | ||
|
||
COPY pom.xml /app/pom.xml | ||
|
||
RUN mvn dependency:go-offline | ||
|
||
COPY src /app/src | ||
|
||
RUN mvn clean package -DskipTests | ||
|
||
FROM openjdk:17-jdk-slim AS deploy | ||
|
||
WORKDIR /app | ||
LABEL org.opencontainers.image.title="TC Backend API" | ||
LABEL org.opencontainers.image.description="Backend API para o projeto TC da FIAP 8SOAT" | ||
LABEL org.opencontainers.image.version="1.0.0" | ||
LABEL org.opencontainers.image.url="https://github.com/fiap-8soat-tc-one/tc-backend-s2" | ||
LABEL org.opencontainers.image.source="https://github.com/fiap-8soat-tc-one/tc-backend-s2" | ||
LABEL org.opencontainers.image.created="2024-09-03" | ||
LABEL org.opencontainers.image.authors="FIAP 8SOAT TEAM 32" | ||
LABEL org.opencontainers.image.licenses="GNU General Public License v3.0" | ||
|
||
WORKDIR /app | ||
COPY --from=build /app/target/*.jar /app/tc-backend-api.jar | ||
|
||
ENTRYPOINT ["java", "-jar", "tc-backend-api.jar"] | ||
ENTRYPOINT ["java", "-jar", "tc-backend-api.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.