cookbook 'do_artifactory', '= 0.1.3'
do_artifactory (5) Versions 0.1.3 Follow1
A utility cookbook for installing the artifactory gem, finding an artifact and returning its location or changing its properties.
cookbook 'do_artifactory', '= 0.1.3', :supermarket
knife supermarket install do_artifactory
knife supermarket download do_artifactory
do_artifactory
Series of resources for using artifactory with Chef
Resources
artifact
Properties
Name | Description | Property Modifiers | Type |
---|---|---|---|
endpoint | Artifactory server url | name property | String |
username | Artifactory credentials, username | optional | String |
password | Artifactory credentials, password | optional | String |
search_type | Search type to find artifact. Valid properties are 'name' or any value contained in property checksums | n/a | String |
search | Search term to find artifact. Either the name or checksum, as specified by search_type | n/a | String |
destination | Directory for artifact to be downloaded to | default: Chef::Config['file_cache_path'] | String |
property_hash | Hash of properties to add or replace if they already exist | optional | Hash{String => String} |
download_path | Location artifact is downloaded to | Identity | String |
checksums | Valid values for search_type (other than 'name') | default ['md5', 'sha1'] | Array[String] |
Actions
Name | Description | Default? |
---|---|---|
:search | Find and download artifact by name or checksum, returns location downloaded to | Yes |
:update_properties | Search artifactory then merge the property_hash with the artifact's properties and save on Artifactory server. Requires property_hash to not be empty. Only adds or modifies | No |
Usage
artifact_location = do_artifactory_artifact 'http://artifactory.mycompany.com' do username 'my_user' password 'my_password' search_type 'sha256' search '3915ed48d8764758bacb5aa9f15cd276' destination '/my_artifacts/this_artifact_type' checksums %w(sha256 sha1 md5) end puts "artifact exists at #{artifact_location.download_path}"
do_artifactory_artifact 'http://artifactory.mycompany.com' do username 'my_user' password 'my_password' search_type 'sha256' search '3915ed48d8764758bacb5aa9f15cd276' property_hash {'chef.cookbook.download_date' => Time.now.utc, 'it.hasbeen.downloaded' => 'true'} checksums %w(sha256 sha1 md5) action :update_properties end ``
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Release 0.1.3 2015/5/11
- Removed gem resource
- Fixed readme example
- Minor fix to log resources in artifact resource
- Fixed download_path to display the location of the downloaded artifact ## Release 0.1.2 2016/5/10
- Version bump for more minor format changes
Release 0.1.1 2016/5/10
- Added support information to metadata.rb
- Corrected README and changelog
Release 0.1.0 2016/5/10
- Initial commit
Foodcritic Metric
0.1.3 passed this metric
0.1.3 passed this metric