This state downloads artifacts from Nexus 3.x.
New in version 2018.3.0.
salt.states.nexus.downloaded(name, artifact, target_dir='/tmp', target_file=None)¶Ensures that the artifact from nexus exists at given location. If it doesn't exist, then it will be downloaded. If it already exists then the checksum of existing file is checked against checksum in nexus. If it is different then the step will fail.
Details of the artifact to be downloaded from nexus. Various options are:
latest - Download the latest release of this artifact
- latest_snapshot - Download the latest snapshot for this artifactAn example to download an artifact to a specific file:
jboss_module_downloaded:
nexus.downloaded:
- artifact:
nexus_url: http://nexus.intranet.example.com/repository
repository: 'libs-release-local'
artifact_id: 'module'
group_id: 'com.company.module'
packaging: 'jar'
classifier: 'sources'
version: '1.0'
- target_file: /opt/jboss7/modules/com/company/lib/module.jar
Download artifact to the folder (automatically resolves file name):
maven_artifact_downloaded:
nexus.downloaded:
- artifact:
nexus_url: http://nexus.intranet.example.com/repository
repository: 'maven-releases'
artifact_id: 'module'
group_id: 'com.company.module'
packaging: 'zip'
classifier: 'dist'
version: '1.0'
- target_dir: /opt/maven/modules/com/company/release
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 3004.1