Skip to content

Update README.MD

Update README.MD #2456

Workflow file for this run

name: CI
#env:
# JDK_JAVA_OPTIONS: --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED
# MAVEN_USERNAME: ch4mpy
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
#server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
#server-username: MAVEN_USERNAME # env variable for username in deploy
#server-password: ${{ secrets.MAVEN_CENTRAL_TOKEN }} # env variable for token in deploy
#gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
#gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }} # env variable for GPG private key passphrase
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Make Maven Wrapper executable
if: contains(matrix.os, 'win') == false
run: chmod +x ./mvnw
- name: Build with Maven
run: ./mvnw clean install
- name: Set VERSION environment variable
run: |
echo "VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Docker Build-Tag-Push gateway ${{ env.VERSION }}
# run: |
# ./mvnw -pl :bff-gateway spring-boot:build-image
# docker tag bff-gateway:${{ env.VERSION }} ${{ secrets.DOCKERHUB_USERNAME }}/bff-gateway
# docker push ${{ secrets.DOCKERHUB_USERNAME }}/bff-gateway
# - name: Docker Build-Tag-Push API ${{ env.VERSION }}
# run: |
# ./mvnw -pl :bff-greetings-api spring-boot:build-image
# docker tag bff-greetings-api:${{ env.VERSION }} ${{ secrets.DOCKERHUB_USERNAME }}/bff-greetings-api
# docker push ${{ secrets.DOCKERHUB_USERNAME }}/bff-greetings-api
# - name: Docker Build-Tag-Push BFF Angular UI
# uses: docker/build-push-action@v4
# with:
# context: ./samples/tutorials/bff/angular
# file: ./samples/tutorials/bff/angular/Dockerfile
# push: true
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/bff-angular-ui
# - name: Docker Build-Tag-Push resource-server_with_ui ${{ env.VERSION }}
# run: |
# ./mvnw -pl :resource-server_with_ui spring-boot:build-image
# docker tag resource-server_with_ui:${{ env.VERSION }} ${{ secrets.DOCKERHUB_USERNAME }}/resource-server_with_ui
# docker push ${{ secrets.DOCKERHUB_USERNAME }}/resource-server_with_ui
# - name: Rollout Restart OVH demo-bff
# run: |
# mkdir ${HOME}/.kube
# echo ${{ secrets.OVH_KUBECONFIG }} | base64 --decode > ${HOME}/.kube/config
# kubectl config use-context ovh
# kubectl rollout restart -n demo-bff deployment.apps/bff-angular-ui deployment.apps/bff-gateway deployment.apps/bff-greetings-api
# kubectl rollout restart -n demo-crs deployment.apps/client-and-resource-server