Skip to content

Commit b93b289

Browse files
authored
BUILD-9220 Set SONARSOURCE_REPOSITORY_URL in config and build-maven actions (#112)
1 parent 81c3683 commit b93b289

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,7 @@ After running this action, the following environment variables are available:
194194
- `DEVELOCITY_ACCESS_KEY`: The Develocity access key when use-develicty is true
195195
- `MAVEN_OPTS`: JVM options for Maven execution. Defaults to `-Xmx1536m -Xms128m` by default
196196
- `PROJECT_VERSION`: The project version with build number appended
197-
- `SONARSOURCE_REPOSITORY_URL`: URL for SonarSource Artifactory root virtual repository (i.e.: sonarsource-qa for public builds or
198-
sonarsource-qa for private builds)
197+
- `SONARSOURCE_REPOSITORY_URL`: URL for SonarSource Artifactory root virtual repository is set to [`sonarsource-qa`](https://repox.jfrog.io/artifactory/sonarsource-qa)
199198

200199
## `build-maven`
201200

@@ -264,6 +263,8 @@ See also [`config-maven`](#config-maven) input environment variables.
264263

265264
### Output Environment Variables
266265

266+
- `SONARSOURCE_REPOSITORY_URL`: URL for SonarSource Artifactory root virtual repository is set to [`sonarsource`](https://repox.jfrog.io/artifactory/sonarsource)
267+
267268
See also [`config-maven`](#config-maven) output environment variables.
268269

269270
### Features

build-maven/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ runs:
7070
(github.event.repository.visibility == 'public' && 'public-deployer' || 'qa-deployer') }}
7171
run: |
7272
echo "ARTIFACTORY_DEPLOYER_ROLE=${ARTIFACTORY_DEPLOYER_ROLE}" >> "$GITHUB_ENV"
73+
echo "SONARSOURCE_REPOSITORY_URL=${ARTIFACTORY_URL}/sonarsource" >> "$GITHUB_ENV"
7374
- name: Vault
7475
# yamllint disable rule:line-length
7576
id: secrets

config-maven/action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,12 @@ runs:
9191
- name: Configure Maven settings and set repository URL
9292
if: steps.from-env.outputs.skip != 'true'
9393
shell: bash
94-
env:
95-
SONARSOURCE_REPOSITORY_URL: ${{ github.event.repository.visibility == 'private' &&
96-
'https://repox.jfrog.io/artifactory/sonarsource-qa' || 'https://repox.jfrog.io/artifactory/sonarsource' }}
9794
run: |
9895
MAVEN_CONFIG="$HOME/.m2"
9996
mkdir -p "$MAVEN_CONFIG"
10097
cp "${GITHUB_ACTION_PATH}/resources/settings.xml" "$MAVEN_CONFIG/settings.xml"
10198
echo "Copied Maven settings from ${GITHUB_ACTION_PATH}/resources/settings.xml to $MAVEN_CONFIG/settings.xml"
102-
echo "SONARSOURCE_REPOSITORY_URL=${SONARSOURCE_REPOSITORY_URL}" >> "$GITHUB_ENV"
99+
echo "SONARSOURCE_REPOSITORY_URL=$ARTIFACTORY_URL/sonarsource-qa" >> "$GITHUB_ENV"
103100
104101
- name: Cache local Maven repository
105102
uses: SonarSource/ci-github-actions/cache@v1

0 commit comments

Comments
 (0)