Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sonar-scanner.yml #15

Merged
merged 1 commit into from
Sep 20, 2023
Merged

Conversation

paulbourelly999
Copy link
Contributor

Run on push to master and develop and on open PRs

PR Details

Description

Related GitHub Issue

Related Jira Key

Motivation and Context

How Has This Been Tested?

Types of changes

  • Defect fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that cause existing functionality to change)

Checklist:

  • I have added any new packages to the sonar-scanner.properties file
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Run on push to master and develop and on open PRs
@sonarcloud
Copy link

sonarcloud bot commented Sep 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

warning The version of Java (11.0.17) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

# branches:
branches:
-master
-develop
pull_request:
types: [opened, synchronize, reopened]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we thought of just triggering GitHub actions as below to avoid duplicates:
Develop branch - Trigger only when PR's are merged or trigger for every change pushed into Develop directly.
Master branch - Trigger only when PR's are merged to master branch as we don't push directly.
Pull request: Triggers only when PR's are opened, closed not synchronize ?
pull_request:
types: [opened, reopened, closed]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each PR merged onto develop or master should be a single commit (squash and merge) so I think triggering on each push makes sense for these branches. Then for pull request we also run to run on each push. Is what I setup correct for this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we only build develop and master upon direct push. pull requests will triggers on each push and there will be two builds when PR are associated to develop or master. This looks good to me if we still feel like more builds are running parallel we can change it accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No the PR request will only run once since they are not develop or master, they are a feature branch. The reason I think PRs where running duplicate is because we had it configured to run on push for every branch including PRs and then a separate trigger for PRs. There will be no duplicates with this.

@paulbourelly999 paulbourelly999 merged commit 0c5ab40 into develop Sep 20, 2023
52 checks passed
@paulbourelly999 paulbourelly999 deleted the fix/sonar_scanner_github_action branch September 20, 2023 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants