The Artifactory resource lets you integrate your pipeline jobs with maven repositories in Artifactory.
This integration allows:
- To deploy artifacts and poms generated by your build
- To retreive artifacts in a repository
- To trigger jobs when a new version of an artifact is available
host: Required. The fully qualified domain name including the context root.
api_key: Required. The API key of a user with sufficient read and write privileges on the repositories you wish to use
repository_id: Required. The repository
group_id: Required. The maven groupId of your artifact
artifact_id: Required. The maven artifactId of your artifact
Resource Type Configuration:
resource_types: - name: artifactory source: repository: emeraldsquad/artifactory-resource type: docker-image
Resource configuration for an artifact:
resources: - name: my-artifact type: artifactory source: api_key: <API KEY> artifact_id: wonderful-artifact group_id: emerald.squad host: "https://emerald.squad.com/artifactory" repository_id: repo-local
- get: my-artifact
- get: my-artifact params: qualifiers: [sources,javadoc]
Pushing local commits to the repo:
- put: my-artifact params: path: artifacts
check: Check for new artifacts.
The resource searches for folders under
http(s)://<host>/<repository_id>/<group_id>/<artifact_id>. It expects to get a list of valid maven versions (See https://cwiki.apache.org/confluence/display/MAVENOLD/Versioning for details). All subsequent versions of the given ref are returned. If no version is provided, the resource returns only the latest.
in: Download the artifacts at the given ref.
Download the artifacts of the given ref to the destination. It will return the same given ref as version.
qualifiers: Optional. The artifacts classifiers ex: [source,javadoc]. If specified, the resource will only retreive the qualified artifacts.
out: Push the artifacts to the repository.
Push the artifacts from the given path to the Artifactory maven repository. The resource will push every files presents in the folder specified in the path parameter. The version parameter is optionnal but the resource expect at least a version file containing a version in the format
<timestamp>-<git hash>. You can easily generate a version of this format from your pipeline using the shell
echo "$(date +'%s')-$(git rev-parse --short HEAD)" > version.
path: Required. The path of the files to push to the repository.
version: Optional. The path to a version file. Defaults to