You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

upgrade-plugins.yml 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: Upgrade SonarQube bundled plugins
  2. on:
  3. schedule:
  4. # At 9:00 every Monday
  5. - cron: "0 9 * * MON"
  6. jobs:
  7. upgrade-plugins-job:
  8. # prevent job to run on public repository sonarsource/sonarqube (where action sources are not available)
  9. if: github.repository == 'sonarsource/sonar-enterprise'
  10. runs-on: ubuntu-latest
  11. name: Upgrades the version of plugins bundled into SonarQube
  12. steps:
  13. - uses: actions/checkout@v1
  14. with:
  15. fetch-depth: 1
  16. ref: master
  17. - name: Upgrade plugins in build and create JIRA ticket
  18. id: upgrade-plugins
  19. uses: ./private/github/actions/upgrade-plugins
  20. env:
  21. GITHUB_ORG_TOKEN: ${{ secrets.GITHUB_ORG_TOKEN }}
  22. JIRA_LOGIN: ${{ secrets.JIRA_LOGIN }}
  23. JIRA_PASSWORD: ${{ secrets.JIRA_PASSWORD }}
  24. REPOX_API_KEY: ${{ secrets.REPOX_API_KEY }}
  25. with:
  26. build_gradle_path: build.gradle
  27. - name: Create Pull Request
  28. if: steps.upgrade-plugins.outputs.has_changes == 'true'
  29. uses: peter-evans/create-pull-request@v1.5.1
  30. env:
  31. COMMIT_MESSAGE: ${{ steps.upgrade-plugins.outputs.commit_message }}
  32. GITHUB_TOKEN: ${{ secrets.GITHUB_ORG_TOKEN }}
  33. PULL_REQUEST_TITLE: ${{ steps.upgrade-plugins.outputs.commit_message }}
  34. PULL_REQUEST_BODY: Auto-generated pull request to apply plugin upgrades.
  35. PULL_REQUEST_BRANCH: bot/upgrade_plugins
  36. PULL_REQUEST_REVIEWERS: wouter-admiraal-sonarsource
  37. BRANCH_SUFFIX: timestamp
  38. PULL_REQUEST_LABELS: bot
  39. - name: Notify failures on Slack
  40. if: failure()
  41. uses: Ilshidur/action-slack@2.0.0
  42. env:
  43. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
  44. with:
  45. args: "Failed to create a PR for updating plugins, see the logs at https://github.com/SonarSource/sonar-enterprise/actions"