The Artifactory Plugin supports overriding variables in the plan configuration like Deployer credentials, Resolver credentials, repositories etc.
If you wish to override any of the values specified in the table below, you need to configure them as Bamboo variables either through the UI or append them to the REST URL request as a query parameters.
When assigning any value to these Bamboo variables, it will override the job configuration.
Example with REST
curl -ubamboo-user:bamboo-password -XPOST "http://<BAMBOO HOST>:8085/rest/api/latest/queue/MVN-JOB?stage&executeAllStages&bamboo.variable.artifactory.override.deployer.username=new_username&bamboo.variable.artifactory.override.deployer.password=new_password"
In the example above, we use CURL to remotely invoke a Bamboo plan. We set the Deployer username and Deployer password for this specific request.
Note that we add the "bamboo.varaible" prefix to the query parameters.
Warning
Note that the sent values will be applied only if the specific task support them. For example: currently Artifactory Gradle tasks do not support Resolver credentials, hence those values will be ignored if sent.
Parameter name | Description | Supported jobs |
---|---|---|
artifactory.override.deployer.username | Deployer username | Maven, Gradle, Ivy, Generic deploy |
artifactory.override.deployer.password | Deployer password | Maven, Gradle, Ivy, Generic deploy |
artifactory.override.resolver.username | Resolver username | Maven, Generic resolve |
artifactory.override.resolver.password | Resolver password | Maven, Generic resolve |
artifactory.override.resolve.repo | Resolve repository | Maven, Gradle |
artifactory.override.deploy.repo | Deploy repository | Maven, Gradle, Ivy, Generic deploy |
artifactory.task.override.jdk | If set to true, check the value of artifactory.task.override.jdk.env.var. If that variable is populated with an environment variable, use the value of that environment variable as the Build JDK path. If artifactory.task.override.jdk.env.varis not defined, use the value of JAVA_HOME for the Build JDK. | Maven, Gradle, Ivy |
artifactory.task.override.jdk.env.var | Stores the name of another environment variable whose value should be used for the build JDK. | Maven, Gradle, Ivy |