Skip to content

Update sonar-project.properties #85

Update sonar-project.properties

Update sonar-project.properties #85

Workflow file for this run

name: Build, Analyze, and Scan
on:
push:
branches:
- main
jobs:
build-analyze-scan:
name: Build, Analyze, and Scan
runs-on: [self-hosted]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build and analyze with SonarQube
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- name: Docker Login
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Trivy file scan
run: trivy fs . > trivyfs.txt
- name: Docker Scout Scan
run: |
docker-scout quickview fs://.
docker-scout cves fs://.
- name: Docker build and push
run: |
# Run commands to build and push Docker images
docker build -t webtest:latest .
docker tag webtest thsre/webtest:latest
docker push thsre/webtest:latest
env:
DOCKER_CLI_ACI: 1
- name: Image scan
run: trivy image thsre/webtest:latest > trivyimage.txt
- name: Docker Scout Image Scan
run: |
docker-scout quickview thsre/webtest:latest
docker-scout cves thsre/webtest:latest
deploy:
needs: build-analyze-scan
runs-on: [self-hosted]
steps:
- name: Docker Pull Image
run: docker pull thsre/webtest:latest
- name: Deploy to Container
run: docker run -d --name game -p 8080:8080 thsre/webtest:latest
- name: Deploy to Helm Chart cluster
run: |
helm install descoshop ./go-prod
helm install postgresql ./postgres-prod