# salt.modules.artifactory

Module for fetching artifacts from Artifactory

exception salt.modules.artifactory.ArtifactoryError(value)

salt.modules.artifactory.get_latest_release(artifactory_url, repository, group_id, artifact_id, packaging, target_dir='/tmp', target_file=None, classifier=None, username=None, password=None, use_literal_group_id=False)

  Gets the latest release of the artifact

  artifactory_url

    URL of artifactory instance

  repository

    Release repository in artifactory to retrieve artifact from, for example: libs-releases

  group_id

    Group Id of the artifact

  artifact_id

    Artifact Id of the artifact

  packaging

    Packaging type (jar,war,ear,etc)

  target_dir

    Target directory to download artifact to (default: /tmp)

  target_file

    Target file to download artifact to (by default it is target_dir/artifact_id-version.packaging)

  classifier

    Artifact classifier name (ex: sources,javadoc,etc). Optional parameter.

  username

    Artifactory username. Optional parameter.

  password

    Artifactory password. Optional parameter.

salt.modules.artifactory.get_latest_snapshot(artifactory_url, repository, group_id, artifact_id, packaging, target_dir='/tmp', target_file=None, classifier=None, username=None, password=None, use_literal_group_id=False)

  Gets latest snapshot of the given artifact

  artifactory_url

    URL of artifactory instance

  repository

    Snapshot repository in artifactory to retrieve artifact from, for example: libs-snapshots

  group_id

    Group Id of the artifact

  artifact_id

    Artifact Id of the artifact

  packaging

    Packaging type (jar,war,ear,etc)

  target_dir

    Target directory to download artifact to (default: /tmp)

  target_file

    Target file to download artifact to (by default it is target_dir/artifact_id-snapshot_version.packaging)

  classifier

    Artifact classifier name (ex: sources,javadoc,etc). Optional parameter.

  username

    Artifactory username. Optional parameter.

  password

    Artifactory password. Optional parameter.

salt.modules.artifactory.get_release(artifactory_url, repository, group_id, artifact_id, packaging, version, target_dir='/tmp', target_file=None, classifier=None, username=None, password=None, use_literal_group_id=False)

  Gets the specified release of the artifact

  artifactory_url

    URL of artifactory instance

  repository

    Release repository in artifactory to retrieve artifact from, for example: libs-releases

  group_id

    Group Id of the artifact

  artifact_id

    Artifact Id of the artifact

  packaging

    Packaging type (jar,war,ear,etc)

  version

    Version of the artifact

  target_dir

    Target directory to download artifact to (default: /tmp)

  target_file

    Target file to download artifact to (by default it is target_dir/artifact_id-version.packaging)

  classifier

    Artifact classifier name (ex: sources,javadoc,etc). Optional parameter.

  username

    Artifactory username. Optional parameter.

  password

    Artifactory password. Optional parameter.

salt.modules.artifactory.get_snapshot(artifactory_url, repository, group_id, artifact_id, packaging, version, snapshot_version=None, target_dir='/tmp', target_file=None, classifier=None, username=None, password=None, use_literal_group_id=False)

  Gets snapshot of the desired version of the artifact

  artifactory_url

    URL of artifactory instance

  repository

    Snapshot repository in artifactory to retrieve artifact from, for example: libs-snapshots

  group_id

    Group Id of the artifact

  artifact_id

    Artifact Id of the artifact

  packaging

    Packaging type (jar,war,ear,etc)

  version

    Version of the artifact

  target_dir

    Target directory to download artifact to (default: /tmp)

  target_file

    Target file to download artifact to (by default it is target_dir/artifact_id-snapshot_version.packaging)

  classifier

    Artifact classifier name (ex: sources,javadoc,etc). Optional parameter.

  username

    Artifactory username. Optional parameter.

  password

    Artifactory password. Optional parameter.

salt.modules.artifactory.set_basic_auth(url, username, password)

  Sets the username and password for a specific url. Helper method.

  CLI Example: