1+ name :HotFix 🔥
2+
3+ on :
4+ push :
5+ branches :
6+ -' hotfix/**'
7+ paths-ignore :
8+ -README.md
9+ -catalog-info.yaml
10+ -' docs/**'
11+
12+ jobs :
13+ env :
14+ uses :devxp-tech/.github/.github/workflows/env.yaml@main
15+
16+ test :
17+ uses :devxp-tech/.github/.github/workflows/test.yaml@main
18+
19+ quality-gate :
20+ runs-on :ubuntu-latest
21+ steps :
22+ -uses :actions/checkout@v2
23+ with :
24+ fetch-depth :0 # Shallow clones should be disabled for a better relevancy of analysis
25+ -name :Set up JDK 17
26+ uses :actions/setup-java@v1
27+ with :
28+ java-version :17
29+ -name :Cache SonarQube packages
30+ uses :actions/cache@v1
31+ with :
32+ path :~/.sonar/cache
33+ key :${{ runner.os }}-sonar
34+ restore-keys :${{ runner.os }}-sonar
35+ -name :Cache Maven packages
36+ uses :actions/cache@v1
37+ with :
38+ path :~/.m2
39+ key :${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
40+ restore-keys :${{ runner.os }}-m2
41+ -name :Build and analyze
42+ env :
43+ SONAR_TOKEN :${{ secrets.SONARQUBE_TOKEN }}
44+ SONAR_HOST_URL :${{ secrets.SONARQUBE_HOST }}
45+ run :mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=devxp-tech_template-java_AYv2pdAkrzkI6H_lpdqk -Dsonar.projectName='template-java'
46+
47+ # quality-gate:
48+ # uses: devxp-tech/.github/.github/workflows/sonarqube.yaml@main
49+ # secrets: inherit
50+
51+ code-scan :
52+ uses :devxp-tech/.github/.github/workflows/synk-golang.yaml@main
53+ secrets :inherit
54+
55+ build-and-push :
56+ uses :devxp-tech/.github/.github/workflows/build-and-push.yaml@main
57+ with :
58+ tag :${{ needs.env.outputs.tag }}
59+ needs :
60+ -env
61+ -test
62+ -quality-gate
63+ -code-scan
64+
65+ security-gateway :
66+ uses :devxp-tech/.github/.github/workflows/trivy.yaml@main
67+ with :
68+ tag :${{ needs.env.outputs.tag }}
69+ needs :
70+ -env
71+ -build-and-push
72+
73+ deploy :
74+ uses :devxp-tech/.github/.github/workflows/deploy.yaml@main
75+ secrets :inherit
76+ with :
77+ tag :${{ needs.env.outputs.tag }}
78+ repository :${{ needs.env.outputs.repository }}
79+ url :https://${{ needs.env.outputs.repository }}.devxp-tech.io
80+ environment :development
81+ needs :
82+ -env
83+ -security-gateway
84+
85+ notify :
86+ uses :devxp-tech/.github/.github/workflows/notify.yaml@main
87+ if :always()
88+ secrets :inherit
89+ needs :
90+ -deploy