Coder Social home page Coder Social logo

do_artifactory's Introduction

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 = 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
artifact.run_action(:search)
# #run_action forces the resource to run during the compile step, populating its properties for use during the compile phase.
puts "artifact exists at #{artifact.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
``

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.