Class: Fastlane::Actions::GetCircleCiArtifactsAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::GetCircleCiArtifactsAction
- Defined in:
- lib/fastlane/plugin/circle_ci/actions/get_circle_ci_artifacts.rb
Documentation collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .example_code ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .output ⇒ Object
- .return_value ⇒ Object
Class Method Summary collapse
Class Method Details
.authors ⇒ Object
90 91 92 |
# File 'lib/fastlane/plugin/circle_ci/actions/get_circle_ci_artifacts.rb', line 90 def self. ["crazymanish"] end |
.available_options ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/fastlane/plugin/circle_ci/actions/get_circle_ci_artifacts.rb', line 36 def self. [ FastlaneCore::ConfigItem.new(key: :api_token, env_name: "FL_GET_CIRCLE_CI_ARTIFACTS_API_TOKEN", description: "API Token for CircleCI API", sensitive: true, code_gen_sensitive: true, is_string: true, default_value: ENV["CIRCLE_CI_API_TOKEN"], default_value_dynamic: true, optional: false), FastlaneCore::ConfigItem.new(key: :vcs_type, env_name: "FL_GET_CIRCLE_CI_ARTIFACTS_VCS_TYPE", description: "CircleCI vcs type i.e github/bitbucket", is_string: true, default_value: "github"), FastlaneCore::ConfigItem.new(key: :user_name, env_name: "FL_GET_CIRCLE_CI_ARTIFACTS_USER_NAME", description: "CircleCI project repo user name i.e For github repo 'crazymanish/some_repo_name', user_name will be 'crazymanish'", is_string: true, optional: false), FastlaneCore::ConfigItem.new(key: :project_name, env_name: "FL_GET_CIRCLE_CI_ARTIFACTS_PROJECT_NAME", description: "CircleCI project repo project name i.e For github repo 'crazymanish/some_repo_name', project_name will be 'some_repo_name'", is_string: true, optional: false), FastlaneCore::ConfigItem.new(key: :build_number, env_name: "FL_GET_CIRCLE_CI_ARTIFACTS_BUILD_NUMBER", description: "CircleCI build number", is_string: true, optional: false) ] end |
.description ⇒ Object
32 33 34 |
# File 'lib/fastlane/plugin/circle_ci/actions/get_circle_ci_artifacts.rb', line 32 def self.description "List the CircleCI artifacts." end |
.example_code ⇒ Object
80 81 82 83 84 85 86 87 88 |
# File 'lib/fastlane/plugin/circle_ci/actions/get_circle_ci_artifacts.rb', line 80 def self.example_code [ 'get_circle_ci_artifacts( user_name: "crazymanish", project_name: "some_repo_name", build_number: "1234" )' ] end |
.is_supported?(platform) ⇒ Boolean
94 95 96 |
# File 'lib/fastlane/plugin/circle_ci/actions/get_circle_ci_artifacts.rb', line 94 def self.is_supported?(platform) true end |
.output ⇒ Object
70 71 72 73 74 |
# File 'lib/fastlane/plugin/circle_ci/actions/get_circle_ci_artifacts.rb', line 70 def self.output [ ['GET_CIRCLE_CI_ARTIFACTS_RESULT', 'An array of artifacts'] ] end |
.return_value ⇒ Object
76 77 78 |
# File 'lib/fastlane/plugin/circle_ci/actions/get_circle_ci_artifacts.rb', line 76 def self.return_value "Returns an array of artifacts produced by a given build." end |
.run(params) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/fastlane/plugin/circle_ci/actions/get_circle_ci_artifacts.rb', line 11 def self.run(params) token = params[:api_token] vcs = params[:vcs_type] name = params[:user_name] project = params[:project_name] build = params[:build_number] uri = "https://circleci.com" api_url = "api/v1.1/project/#{vcs}/#{name}/#{project}/#{build}/artifacts" curl_command = "curl -H 'Content-Type: application/json' -H 'Circle-Token: #{token}' -s #{uri}/#{api_url}" result = Helper::CircleCiHelper.execute(curl_command) Actions.lane_context[SharedValues::GET_CIRCLE_CI_ARTIFACTS_RESULT] = result result end |