Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,32 @@ workflows:
- test-us-region:
filters: *filters
name: integration-test-us-region
# The orb must be re-packed for publishing, and saved to the workspace.
- orb-tools/pack:
filters: *release-filters
- orb-tools/publish:
orb_name: sonarsource/sonarcloud
vcs_type: github
pub_type: production
# Ensure this job requires all test jobs and the pack job.
filters: *filters
requires:
- orb-tools/pack
- integration-test-node
- integration-test-circleci-python
- integration-test-us-region
- orb-tools/publish:
filters: *filters
context: Publishing Orb
filters: *release-filters
orb_name: sonarsource/sonarcloud
pub_type: dev
requires:
- orb-tools/pack
vcs_type: github
# The orb must be re-packed for publishing, and saved to the workspace.
# - orb-tools/pack:
# filters: *release-filters
# - orb-tools/publish:
# orb_name: sonarsource/sonarcloud
# vcs_type: github
# pub_type: production
# # Ensure this job requires all test jobs and the pack job.
# requires:
# - orb-tools/pack
# - integration-test-node
# - integration-test-circleci-python
# - integration-test-us-region
# context: Publishing Orb
# filters: *release-filters
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
# sonarcloud-circleci-orb

Support for SonarScanner CLI in CircleCI

## SonarQube Cloud Orb

The SonarQube Cloud Orb can be used with any Linux-based Docker image that includes the command-line tools `curl` and `unzip`.

### Connecting to the EU region

- To connect to your SonarQube Cloud project on `sonarcloud.io`, you need to set up an API token. We recommend setting up a CircleCI context in your organization named `sonarcloud` that contains a variable with the key `SONAR_TOKEN` and the API token as the value.

### Connecting to the US region

- To connect to your SonarQube Cloud project in the US region, `sonarqube.us`, you need to pass the `sonar.region=US` parameter to the scanner. For this, we recommend adding the `SONAR_REGION` environment variable to your CircleCI context with the value `US`.
- To set up the API token, the recommendation is the same as for the EU region.

### Usage examples

See files in [the `examples` directory](https://github.com/SonarSource/sonarcloud-circleci-orb/tree/master/src/examples) for examples of how to use the orb.

### Publishing a new version

To publish a new version of the orb, you need to change the version found in `.circleci/config.yml` to the new version. The CircleCI build pipeline will then publish the new version of the orb.

### Requirements
See https://docs.sonarcloud.io/appendices/scanner-environment/

See <https://docs.sonarcloud.io/appendices/scanner-environment/>