Use this plugin to publish artifacts from the build to Artifactory. You can override the default configuration with the following parameters:
url
- Artifactory URL (Includes scheme)username
- Artifactory username, default to blankpassword
- Artifactory password, default to blankpom
- An optional pom.xml path were to read project detailsgroup_id
- Project group id, default to value from Pom fileartifact_id
- Project artifact id, default to value from Pom fileversion
- Artifact version, default to value from Pom filerepo_key
- Target repository key, default to 'libs-snapshot-local' if version contains 'snapshot', 'libs-release-local' otherwisefiles
- List of files to deployforce_upload
- Force upload if a file already exists
All file paths must be relative to current project sources
File paths are interpreted with node-glob and can contain things such as regex, or directory wildcards(./**/*.js)
The following secret values can be set to configure the plugin.
- ARTIFACTORY_URL - corresponds to url
- ARTIFACTORY_USERNAME - corresponds to username
- ARTIFACTORY_PASSWORD - corresponds to password
It is highly recommended to put the ARTIFACTORY_USERNAME and ARTIFACTORY_PASSWORD into secrets so it is not exposed to users. This can be done using the drone-cli.
drone secret add --image=athieriot/drone-artifactory \
octocat/hello-world ARTIFACTORY_USERNAME kevinbacon
drone secret add --image=athieriot/drone-artifactory \
octocat/hello-world ARTIFACTORY_PASSWORD pa55word
Then sign the YAML file after all secrets are added.
drone sign octocat/hello-world
See secrets for additional information on secrets
The following is a sample configuration in your .drone.yml file:
pipeline:
artifactory:
image: athieriot/drone-artifactory
url: http://arti.company.com
username: admin
pom: pom.xml
repo_key: libs-snapshot-local
files:
- target/*.jar
- target/*.war
- dist/**/*.min.js
If a pom parameter is specified it will be automatically deployed. It is not necessary to specify the pom under the files parameter.
In the example above, pom.xml will be deployed as <groupId>-<artifactId>-<version>.pom