version 1.8.0-Release & deploy 1.8.0-Release.jar #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: DevOps | |
on: | |
push: | |
branches: ['develop', 'release-*'] | |
jobs: | |
devops: | |
name: Test - Unit & Integration & SonarCloud Scan & Slack WebHook | |
runs-on: ubuntu-latest # macos-latest macos-11 windows-2019 ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: {fetch-depth: 0} | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Unit & Integration Tests | |
run: mvn -B verify # -B: --batch-mode | |
- name: Sonar | |
if: success() # always() failure() success() | |
run: > | |
mvn -B verify -DskipTests sonar:sonar | |
-Dsonar.projectKey=es.upm.miw:iwvg-devops | |
-Dsonar.organization=miw-upm-github | |
-Dsonar.host.url=https://sonarcloud.io | |
-Dsonar.login=$SONAR_TOKEN | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Slack WebHook | |
if: failure() | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
fields: repo,author,commit,author,workflow, # selectable (default: repo,message) | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required |