File tree Expand file tree Collapse file tree 2 files changed +64
-3
lines changed
Expand file tree Collapse file tree 2 files changed +64
-3
lines changed Original file line number Diff line number Diff line change 66 - main
77
88jobs :
9- build-deploy :
10- name : Build and Deploy Comment Service
9+ testing :
10+ name : Testing Video Service
1111 runs-on : ubuntu-latest
1212 steps :
13+
1314 - name : Checkout code
1415 uses : actions/checkout@v3
1516
2324 run : echo "SPRING_DATA_MONGODB_URI=mongodb://localhost:27017/video-service" >> $GITHUB_ENV
2425
2526 - name : Unit Tests
26- run : mvn -B test --file pom.xml
27+ run : mvn -B test --file pom.xml
28+
29+ # - name: SonarQube Scan
30+ # env:
31+ # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
32+ # run: mvn org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar \
33+ # -Dsonar.projectKey=devops-video-sharing \
34+ # -Dsonar.host.url=https://sonarcloud.io \
35+ # -Dsonar.login=${{ secrets.SONAR_TOKEN }}
36+
37+ build-image :
38+ needs : testing
39+ uses : ./.github/workflows/build-image.yaml
40+ secrets :
41+ DOCKER_HUB_ACCESS_TOKEN : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
42+
43+ scan-image :
44+ needs : build-image
45+ uses : ./.github/workflows/scan-image.yaml
46+
47+ notify :
48+ needs : scan-image
49+ uses : ./.github/workflows/notifyCI.yaml
50+ secrets :
51+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
Original file line number Diff line number Diff line change 1+ name : Send Slack Notification for Video Service
2+
3+ on :
4+ workflow_call :
5+ secrets :
6+ SLACK_WEBHOOK_URL :
7+ required : true
8+
9+ jobs :
10+ success_notifier :
11+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Send success notification on Slack
15+ 16+ with :
17+ payload : |
18+ {
19+ "text": "The Continuous Integration for Video Service workflow has completed successfully."
20+ }
21+ env :
22+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
23+
24+ failure_notifier :
25+ if : ${{ github.event.workflow_run.conclusion != 'success' }}
26+ runs-on : ubuntu-latest
27+ steps :
28+ - name : Send failure notification on Slack
29+ 30+ with :
31+ payload : |
32+ {
33+ "text": "The Continuous Integration for Video Service workflow has failed."
34+ }
35+ env :
36+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
You can’t perform that action at this time.
0 commit comments