fastlane/lib/fastlane/actions/artifactory.rb in fastlane-2.28.8 vs fastlane/lib/fastlane/actions/artifactory.rb in fastlane-2.28.9
- old
+ new
@@ -1,7 +1,12 @@
module Fastlane
module Actions
+ module SharedValues
+ ARTIFACTORY_DOWNLOAD_URL = :ARTIFACTORY_DOWNLOAD_URL
+ ARTIFACTORY_DOWNLOAD_SIZE = :ARTIFACTORY_DOWNLOAD_SIZE
+ end
+
class ArtifactoryAction < Action
def self.run(params)
Actions.verify_gem!('artifactory')
require 'artifactory'
@@ -15,10 +20,14 @@
"sha1" => Digest::SHA1.file(file_path),
"md5" => Digest::MD5.file(file_path)
}
UI.message("Uploading file: #{artifact.local_path} ...")
upload = artifact.upload(params[:repo], params[:repo_path], params[:properties])
+
+ Actions.lane_context[SharedValues::ARTIFACTORY_DOWNLOAD_URL] = upload.uri
+ Actions.lane_context[SharedValues::ARTIFACTORY_DOWNLOAD_SIZE] = upload.size
+
UI.message("Uploaded Artifact:")
UI.message("Repo: #{upload.repo}")
UI.message("URI: #{upload.uri}")
UI.message("Size: #{upload.size}")
UI.message("SHA1: #{upload.sha1}")
@@ -42,10 +51,17 @@
def self.is_supported?(platform)
true
end
def self.author
- ["koglinjg"]
+ ["koglinjg", "tommeier"]
+ end
+
+ def self.output
+ [
+ ['ARTIFACTORY_DOWNLOAD_URL', 'The download url for file uploaded'],
+ ['ARTIFACTORY_DOWNLOAD_SIZE', 'The reported file size for file uploaded']
+ ]
end
def self.example_code
[
'artifactory(