BUILD-11500 Use self-hosted Artifactory for Maven actions - #280
BUILD-11500 Use self-hosted Artifactory for Maven actions#280hedinasr wants to merge 16 commits into
Conversation
232cc55 to
b4665bb
Compare
b4665bb to
29e0585
Compare
Remove repox-url and repox-artifactory-url from config-maven, build-maven, and promote. Set ARTIFACTORY_URL to https://repox.dev.sonar.build/artifactory in those actions; credentials still come from Vault as before. Update README for config-maven, build-maven, and promote. Breaking change: repox-url and repox-artifactory-url are no longer accepted on config-maven, build-maven, or promote.
29e0585 to
0314185
Compare
Accidentally downgraded when restoring action files from an older branch commit.
| <releases> | ||
| <enabled>true</enabled> | ||
| <!-- no need to always check if new versions are available when executing a Maven plugin without specifying the version --> | ||
| <updatePolicy>interval:60</updatePolicy> | ||
| <updatePolicy>always</updatePolicy> | ||
| <checksumPolicy>fail</checksumPolicy> |
There was a problem hiding this comment.
⚠️ Quality: updatePolicy=always contradicts adjacent comment and adds overhead
In the plugin releases repository, updatePolicy was changed from interval:60 to always, but the comment directly above it still reads: "no need to always check if new versions are available when executing a Maven plugin without specifying the version". The code now does the exact opposite of what the comment states.
Functionally, always makes Maven check the remote repository for plugin updates on every single build. For a release (non-snapshot) plugin repository this is almost never desired — released artifacts are immutable, so the only effect is added network round-trips (and slower, less reliable builds) on each invocation. interval:60 (or daily) already balanced freshness against performance.
Suggested fix: either revert to interval:60/daily, or if always is intentional, update the comment to explain why frequent checks are now required. Note the <releases> repository block above (line 48) still uses interval:60, so this also introduces an inconsistency between the two repository definitions.
Revert to interval:60 to match the comment and the releases repository above.:
<releases>
<enabled>true</enabled>
<!-- no need to always check if new versions are available when executing a Maven plugin without specifying the version -->
<updatePolicy>interval:60</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
Was this helpful? React with 👍 / 👎
77bcec5 to
8bac5c3
Compare
|
…guard; derive vault URL from ARTIFACTORY_URL instead of hardcoding vault.dev
…RL; drop redundant prod-vault promote step
Reader credentials come from steps.artifactory, not steps.secrets (Develocity-only). Empty auth caused 401 against repox-internal. Also restore null-safe fromJSON for deploy vault outputs in build-maven.
Vault returns vault-SonarSource-... but Access token subjects are vault-sonarsource-.... Edge DENIED LOGIN on case mismatch; Bearer worked.
|
CI failed: 1 pre-commit CI failure caused by a markdownlint rule violation (MD060) due to misaligned table pipes in README.md.OverviewAll 4 analyzed CI logs failed due to the same tooling error: the FailuresMarkdownlint Table Style Violation (confidence: high)
Summary
Code Review
|
| Auto-apply | Compact | Unblock |
|
|
|
Was this helpful? React with 👍 / 👎 | Gitar



BUILD-11500 This PR switches
config-maven,build-maven(viaconfig-maven), andpromoteto the self-hosted JFrog instance athttps://repox.dev.sonar.build/artifactory.Changes
repox-urlandrepox-artifactory-urlinputs fromconfig-maven,build-maven, andpromote.ARTIFACTORY_URLtohttps://repox.dev.sonar.build/artifactoryin the composite action steps (not configurable).private-reader/public-reader, deployer, promoter) and document the fixed URL in the README.Breaking changes
repox-urlorrepox-artifactory-urltoconfig-maven,build-maven, orpromotemust drop those inputs.Other actions (
config-gradle,config-pip,build-npm, etc.) still userepox-*URL inputs and are unchanged in this PR.Prerequisites (Platform)
development/artifactorymount must reachrepox.dev.sonar.buildand issue tokens valid for that instance.*-reader,*-qa-deployer,*-promoter, etc.) must exist for the new instance as needed.Test plan
config-mavenon a sample repo resolves dependencies fromrepox.dev.sonar.build.build-mavenbuild and deploy still work end-to-end.promotepromotes a build against the same instance.Summary by Gitar
repox-urlandrepox-artifactory-urlinputs fromconfig-maven,build-maven, andpromoteactions.ARTIFACTORY_URLtohttps://repox-internal.dev.sonar.build/artifactoryacross core Maven actions.vault-action-wrappercalls to usehttps://vault.sonar.buildexclusively.ARTIFACTORY_DEPLOYsecret mapping to extract credentials directly from Vault outputs.updatePolicytoalwaysinsettings.xmlto ensure fresh metadata resolution.README.mdto clarify self-hosted Artifactory usage and reflect the removal ofrepox-urlinputs.contentspermission requirement fromwritetoreadfor workflows.This will update automatically on new commits.