diff --git a/build-maven/action.yml b/build-maven/action.yml index 56552881..514e062c 100644 --- a/build-maven/action.yml +++ b/build-maven/action.yml @@ -51,6 +51,9 @@ inputs: repox-url: description: URL for Repox default: https://repox.jfrog.io + vault-url: + description: Vault address used to mint Artifactory tokens. Independent of `repox-url`. + default: https://vault.sonar.build use-develocity: description: Whether to use Develocity for build tracking. default: 'false' @@ -116,6 +119,7 @@ runs: artifactory-reader-role: ${{ inputs.artifactory-reader-role }} common-mvn-flags: ${{ inputs.common-mvn-flags }} repox-url: ${{ inputs.repox-url }} + vault-url: ${{ inputs.vault-url }} use-develocity: ${{ inputs.use-develocity }} develocity-url: ${{ inputs.develocity-url }} cache-paths: ${{ inputs.cache-paths }} @@ -153,7 +157,7 @@ runs: if: inputs.deploy != 'false' id: artifactory with: - url: ${{ contains(inputs.repox-url, 'dev.sonar.build') && 'https://vault.dev.sonar.build' || 'https://vault.sonar.build' }} + url: ${{ inputs.vault-url }} # yamllint disable rule:line-length secrets: | ${{ inputs.deploy != 'false' && inputs.run-shadow-scans != 'true' && steps.params.outputs.ARTIFACTORY_DEPLOY_USERNAME_VAULT || '' }} diff --git a/config-maven/action.yml b/config-maven/action.yml index 7750f3b6..4547db04 100644 --- a/config-maven/action.yml +++ b/config-maven/action.yml @@ -15,6 +15,9 @@ inputs: repox-url: description: URL for Repox default: https://repox.jfrog.io + vault-url: + description: Vault address used to mint Artifactory tokens. Independent of `repox-url`. + default: https://vault.sonar.build use-develocity: description: Whether to use Develocity for build tracking. default: 'false' @@ -95,7 +98,7 @@ runs: if: steps.config-maven-completed.outputs.skip != 'true' id: artifactory with: - url: ${{ contains(inputs.repox-url, 'dev.sonar.build') && 'https://vault.dev.sonar.build' || 'https://vault.sonar.build' }} + url: ${{ inputs.vault-url }} secrets: | development/artifactory/token/{REPO_OWNER_NAME_DASH}-${{ env.ARTIFACTORY_READER_ROLE }} username | ARTIFACTORY_USERNAME; development/artifactory/token/{REPO_OWNER_NAME_DASH}-${{ env.ARTIFACTORY_READER_ROLE }} access_token | ARTIFACTORY_ACCESS_TOKEN;