Skip to content

⚡ (postservice) fix category query huge return size in bytes; do … #216

⚡ (postservice) fix category query huge return size in bytes; do …

⚡ (postservice) fix category query huge return size in bytes; do … #216

Workflow file for this run

name: CI/CD Pipeline
on:
push:
jobs:
build_test_java:
name: Build Java services
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
continue-on-error: true
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
build_publish_docker:
name: Build&Publish - Util Docker images
runs-on: ubuntu-latest
needs: build_test_java
strategy:
matrix:
image:
- prometheus
- grafana
- snmp-exporter
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build-Tag-Push
run: |
docker build -t ${{ matrix.image }}:${{ github.run_id }} -f ./docker/${{ matrix.image }}/Dockerfile .
BRANCH_NAME=${GITHUB_REF##*/}
docker tag ${{ matrix.image }}:${{ github.run_id }} ghcr.io/tobias-pe/distributed-systems-energy-efficiency/${{ matrix.image }}:latest
docker tag ${{ matrix.image }}:${{ github.run_id }} ghcr.io/tobias-pe/distributed-systems-energy-efficiency/${{ matrix.image }}:${BRANCH_NAME}
docker push ghcr.io/tobias-pe/distributed-systems-energy-efficiency/${{ matrix.image }}:latest
docker push ghcr.io/tobias-pe/distributed-systems-energy-efficiency/${{ matrix.image }}:${BRANCH_NAME}
build_publish_spring_boot:
name: Build&Publish - Spring Boot Docker images
runs-on: ubuntu-latest
needs: build_test_java
strategy:
matrix:
image:
- gateway
- servicediscovery
- userservice
- postservice
- notificationservice
- statisticservice
- feedservice
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Make Maven Wrapper executable
if: contains(matrix.os, 'win') == false
run: chmod +x ./mvnw
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set VERSION environment variable
run: |
echo "VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout -pl ${{ matrix.image }})" >> $GITHUB_ENV
- name: Docker Build-Tag-Push
run: |
./mvnw spring-boot:build-image -pl ${{ matrix.image }} -am
BRANCH_NAME=${GITHUB_REF##*/}
docker tag ${{ matrix.image }}:${{ env.VERSION }} ghcr.io/tobias-pe/distributed-systems-energy-efficiency/${{ matrix.image }}:latest
docker tag ${{ matrix.image }}:${{ env.VERSION }} ghcr.io/tobias-pe/distributed-systems-energy-efficiency/${{ matrix.image }}:${BRANCH_NAME}
docker push ghcr.io/tobias-pe/distributed-systems-energy-efficiency/${{ matrix.image }}:latest
docker push ghcr.io/tobias-pe/distributed-systems-energy-efficiency/${{ matrix.image }}:${BRANCH_NAME}