Module: Capistrano::Deploy::Strategy::JenkinsArtifact::Helpers
- Defined in:
- lib/capistrano/recipes/deploy/strategy/jenkins_artifact.rb
Class Method Summary collapse
Class Method Details
.get_artifact_url_by_build(build, &finder) ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/capistrano/recipes/deploy/strategy/jenkins_artifact.rb', line 28 def self.get_artifact_url_by_build(build, &finder) finder ||= ->(_) { true } matched_artifact = build['artifacts'].find(&finder) raise 'Specified artifact not found in current build !!' unless matched_artifact relative_build_path = matched_artifact['relativePath'] jenkins_path = build['url'] artifact_path = URI.escape("#{jenkins_path}artifact/#{relative_build_path}") return artifact_path end |