Skip to content

Added Dashboard Page #138

Added Dashboard Page

Added Dashboard Page #138

name: GCP Pipeline
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 19
uses: actions/setup-java@v3
with:
java-version: '19'
distribution: 'temurin'
cache: maven
- name: SonarCloud Scan
run: |
cat projects-changes-deploy.txt | while read repo; do
echo "Processing repository: $repo"
cd $repo
mvn clean verify sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=nashtech -Dsonar.branch.name=master
cd ..
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
setup-build-publish-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 19
uses: actions/setup-java@v3
with:
java-version: '19'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }}
- uses: 'google-github-actions/auth@v1'
with:
credentials_json: ${{ secrets.GKE_KEY }}
- uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ env.GKE_PROJECT }}
# Configure Docker to use the gcloud command-line tool as a credential
# helper for authentication
- name: configure docker
run: |-
gcloud --quiet auth configure-docker
- name: Build, Publish, and Deploy
run: |
. apps-deployment-script.sh "us-east1"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}