fastlane-plugin-circle_ci 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +52 -0
- data/lib/fastlane/plugin/circle_ci.rb +16 -0
- data/lib/fastlane/plugin/circle_ci/actions/download_circle_ci_artifact.rb +87 -0
- data/lib/fastlane/plugin/circle_ci/actions/get_circle_ci_artifacts.rb +99 -0
- data/lib/fastlane/plugin/circle_ci/actions/get_circle_ci_build_status.rb +99 -0
- data/lib/fastlane/plugin/circle_ci/actions/trigger_circle_ci_job.rb +120 -0
- data/lib/fastlane/plugin/circle_ci/helper/circle_ci_helper.rb +16 -0
- data/lib/fastlane/plugin/circle_ci/version.rb +5 -0
- metadata +177 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: df159dcb5e7196261f50c734d884710f7914b100117215c6f15ffa21083c1ba8
|
4
|
+
data.tar.gz: 5ade2668f0c01b0db8d55a2aec8ace417a4d54bc7bf983ae25bad26e93acbbb3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f1f1d15f56fd15b4d134c451e7c64146c44e276d8b6cbeb243daf651b48720ce5f37db5c75f9de91be3f18ef845a598cfb7faf8cfbf1494081f87e0323830213
|
7
|
+
data.tar.gz: 0c87e5b6b4c66be23dcbd33e13bc3bccc275b1bbea1b0dc02c4611a3c04c3030a9a40233c8ab60b7a0e8adc1be6a862b0f9ca9b3f5b42d3f81d64131b33bd6f4
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Manish Rathi
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# circle_ci plugin
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/fastlane-plugin-circle_ci)
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-circle_ci`, add it to your project by running:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
fastlane add_plugin circle_ci
|
11
|
+
```
|
12
|
+
|
13
|
+
## About circle_ci
|
14
|
+
|
15
|
+
A fastlane plugin for Circle CI. 🚀
|
16
|
+
|
17
|
+
**Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
|
18
|
+
|
19
|
+
## Example
|
20
|
+
|
21
|
+
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
|
22
|
+
|
23
|
+
**Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
|
24
|
+
|
25
|
+
## Run tests for this plugin
|
26
|
+
|
27
|
+
To run both the tests, and code style validation, run
|
28
|
+
|
29
|
+
```
|
30
|
+
rake
|
31
|
+
```
|
32
|
+
|
33
|
+
To automatically fix many of the styling issues, use
|
34
|
+
```
|
35
|
+
rubocop -a
|
36
|
+
```
|
37
|
+
|
38
|
+
## Issues and Feedback
|
39
|
+
|
40
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
41
|
+
|
42
|
+
## Troubleshooting
|
43
|
+
|
44
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
45
|
+
|
46
|
+
## Using _fastlane_ Plugins
|
47
|
+
|
48
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
49
|
+
|
50
|
+
## About _fastlane_
|
51
|
+
|
52
|
+
_fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane/plugin/circle_ci/version'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module CircleCi
|
5
|
+
# Return all .rb files inside the "actions" and "helper" directory
|
6
|
+
def self.all_classes
|
7
|
+
Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# By default we want to import all available actions and helpers
|
13
|
+
# A plugin can contain any number of actions and plugins
|
14
|
+
Fastlane::CircleCi.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require_relative '../helper/circle_ci_helper'
|
3
|
+
|
4
|
+
module Fastlane
|
5
|
+
module Actions
|
6
|
+
module SharedValues
|
7
|
+
DOWNLOAD_CIRCLE_CI_ARTIFACT_RESULT = :DOWNLOAD_CIRCLE_CI_ARTIFACT_RESULT
|
8
|
+
end
|
9
|
+
|
10
|
+
class DownloadCircleCiArtifactAction < Action
|
11
|
+
def self.run(params)
|
12
|
+
token = params[:api_token]
|
13
|
+
url = params[:file_url]
|
14
|
+
name = params[:output_file_name] || File.basename(url)
|
15
|
+
|
16
|
+
curl_command = "curl -H 'Circle-Token: #{token}' -Ls -o /dev/null -w %{url_effective} #{url}"
|
17
|
+
redirect_url = Actions::sh("#{curl_command}", log: false)
|
18
|
+
|
19
|
+
curl_command = "curl -o #{name} '#{redirect_url}'"
|
20
|
+
result = Actions::sh("#{curl_command}", log: false)
|
21
|
+
|
22
|
+
Actions.lane_context[SharedValues::DOWNLOAD_CIRCLE_CI_ARTIFACT_RESULT] = result
|
23
|
+
result
|
24
|
+
end
|
25
|
+
|
26
|
+
#####################################################
|
27
|
+
# @!group Documentation
|
28
|
+
#####################################################
|
29
|
+
|
30
|
+
def self.description
|
31
|
+
"Download the CircleCI artifact file."
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.available_options
|
35
|
+
[
|
36
|
+
FastlaneCore::ConfigItem.new(key: :api_token,
|
37
|
+
env_name: "FL_DOWNLOAD_CIRCLE_CI_ARTIFACT_API_TOKEN",
|
38
|
+
description: "API Token for CircleCI API",
|
39
|
+
sensitive: true,
|
40
|
+
code_gen_sensitive: true,
|
41
|
+
is_string: true,
|
42
|
+
default_value: ENV["CIRCLE_CI_API_TOKEN"],
|
43
|
+
default_value_dynamic: true,
|
44
|
+
optional: false),
|
45
|
+
FastlaneCore::ConfigItem.new(key: :file_url,
|
46
|
+
env_name: "FL_DOWNLOAD_CIRCLE_CI_ARTIFACT_FILE_URL",
|
47
|
+
description: "CircleCI artifact file url",
|
48
|
+
is_string: true,
|
49
|
+
optional: false),
|
50
|
+
FastlaneCore::ConfigItem.new(key: :output_file_name,
|
51
|
+
env_name: "FL_DOWNLOAD_CIRCLE_CI_ARTIFACT_OUTPUT_FILE_NAME",
|
52
|
+
description: "CircleCI artifact output file name",
|
53
|
+
is_string: true,
|
54
|
+
optional: true)
|
55
|
+
]
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.output
|
59
|
+
[
|
60
|
+
['DOWNLOAD_CIRCLE_CI_ARTIFACT_RESULT', 'Output of the downloaded artifact']
|
61
|
+
]
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.return_value
|
65
|
+
"Returns the output of the downloaded artifact."
|
66
|
+
end
|
67
|
+
|
68
|
+
def self.example_code
|
69
|
+
[
|
70
|
+
'download_circle_ci_artifact(file_url: "circleci artifact file url")',
|
71
|
+
'download_circle_ci_artifact(
|
72
|
+
api_token: ENV["CIRCLE_CI_API_TOKEN"],
|
73
|
+
file_url: "circleci artifact file url"
|
74
|
+
)'
|
75
|
+
]
|
76
|
+
end
|
77
|
+
|
78
|
+
def self.authors
|
79
|
+
["crazymanish"]
|
80
|
+
end
|
81
|
+
|
82
|
+
def self.is_supported?(platform)
|
83
|
+
true
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require_relative '../helper/circle_ci_helper'
|
3
|
+
|
4
|
+
module Fastlane
|
5
|
+
module Actions
|
6
|
+
module SharedValues
|
7
|
+
GET_CIRCLE_CI_ARTIFACTS_RESULT = :GET_CIRCLE_CI_ARTIFACTS_RESULT
|
8
|
+
end
|
9
|
+
|
10
|
+
class GetCircleCiArtifactsAction < Action
|
11
|
+
def self.run(params)
|
12
|
+
token = params[:api_token]
|
13
|
+
vcs = params[:vcs_type]
|
14
|
+
name = params[:user_name]
|
15
|
+
project = params[:project_name]
|
16
|
+
build = params[:build_number]
|
17
|
+
|
18
|
+
uri = "https://circleci.com"
|
19
|
+
api_url = "api/v1.1/project/#{vcs}/#{name}/#{project}/#{build}/artifacts"
|
20
|
+
curl_command = "curl -H 'Content-Type: application/json' -H 'Circle-Token: #{token}' -s #{uri}/#{api_url}"
|
21
|
+
|
22
|
+
result = Actions::sh("#{curl_command}", log: false)
|
23
|
+
|
24
|
+
Actions.lane_context[SharedValues::GET_CIRCLE_CI_ARTIFACTS_RESULT] = result
|
25
|
+
result
|
26
|
+
end
|
27
|
+
|
28
|
+
#####################################################
|
29
|
+
# @!group Documentation
|
30
|
+
#####################################################
|
31
|
+
|
32
|
+
def self.description
|
33
|
+
"List the CircleCI artifacts."
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.available_options
|
37
|
+
[
|
38
|
+
FastlaneCore::ConfigItem.new(key: :api_token,
|
39
|
+
env_name: "FL_GET_CIRCLE_CI_ARTIFACTS_API_TOKEN",
|
40
|
+
description: "API Token for CircleCI API",
|
41
|
+
sensitive: true,
|
42
|
+
code_gen_sensitive: true,
|
43
|
+
is_string: true,
|
44
|
+
default_value: ENV["CIRCLE_CI_API_TOKEN"],
|
45
|
+
default_value_dynamic: true,
|
46
|
+
optional: false),
|
47
|
+
FastlaneCore::ConfigItem.new(key: :vcs_type,
|
48
|
+
env_name: "FL_GET_CIRCLE_CI_ARTIFACTS_VCS_TYPE",
|
49
|
+
description: "CircleCI vcs type i.e github/bitbucket",
|
50
|
+
is_string: true,
|
51
|
+
default_value: "github"),
|
52
|
+
FastlaneCore::ConfigItem.new(key: :user_name,
|
53
|
+
env_name: "FL_GET_CIRCLE_CI_ARTIFACTS_USER_NAME",
|
54
|
+
description: "CircleCI project repo user name i.e For github repo 'crazymanish/some_repo_name', user_name will be 'crazymanish'",
|
55
|
+
is_string: true,
|
56
|
+
optional: false),
|
57
|
+
FastlaneCore::ConfigItem.new(key: :project_name,
|
58
|
+
env_name: "FL_GET_CIRCLE_CI_ARTIFACTS_PROJECT_NAME",
|
59
|
+
description: "CircleCI project repo project name i.e For github repo 'crazymanish/some_repo_name', project_name will be 'some_repo_name'",
|
60
|
+
is_string: true,
|
61
|
+
optional: false),
|
62
|
+
FastlaneCore::ConfigItem.new(key: :build_number,
|
63
|
+
env_name: "FL_GET_CIRCLE_CI_ARTIFACTS_BUILD_NUMBER",
|
64
|
+
description: "CircleCI build number",
|
65
|
+
is_string: true,
|
66
|
+
optional: false)
|
67
|
+
]
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.output
|
71
|
+
[
|
72
|
+
['GET_CIRCLE_CI_ARTIFACTS_RESULT', 'An array of artifacts']
|
73
|
+
]
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.return_value
|
77
|
+
"Returns an array of artifacts produced by a given build."
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.example_code
|
81
|
+
[
|
82
|
+
'get_circle_ci_artifacts(
|
83
|
+
user_name: "crazymanish",
|
84
|
+
project_name: "some_repo_name",
|
85
|
+
build_number: "1234"
|
86
|
+
)'
|
87
|
+
]
|
88
|
+
end
|
89
|
+
|
90
|
+
def self.authors
|
91
|
+
["crazymanish"]
|
92
|
+
end
|
93
|
+
|
94
|
+
def self.is_supported?(platform)
|
95
|
+
true
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require_relative '../helper/circle_ci_helper'
|
3
|
+
|
4
|
+
module Fastlane
|
5
|
+
module Actions
|
6
|
+
module SharedValues
|
7
|
+
GET_CIRCLE_CI_BUILD_STATUS_RESULT = :GET_CIRCLE_CI_BUILD_STATUS_RESULT
|
8
|
+
end
|
9
|
+
|
10
|
+
class GetCircleCiBuildStatusAction < Action
|
11
|
+
def self.run(params)
|
12
|
+
token = params[:api_token]
|
13
|
+
vcs = params[:vcs_type]
|
14
|
+
name = params[:user_name]
|
15
|
+
project = params[:project_name]
|
16
|
+
build = params[:build_number]
|
17
|
+
|
18
|
+
uri = "https://circleci.com"
|
19
|
+
api_url = "api/v1.1/project/#{vcs}/#{name}/#{project}/#{build}"
|
20
|
+
curl_command = "curl -H 'Content-Type: application/json' -H 'Circle-Token: #{token}' -s #{uri}/#{api_url}"
|
21
|
+
|
22
|
+
result = Actions::sh("#{curl_command}", log: false)
|
23
|
+
|
24
|
+
Actions.lane_context[SharedValues::GET_CIRCLE_CI_BUILD_STATUS_RESULT] = result
|
25
|
+
result
|
26
|
+
end
|
27
|
+
|
28
|
+
#####################################################
|
29
|
+
# @!group Documentation
|
30
|
+
#####################################################
|
31
|
+
|
32
|
+
def self.description
|
33
|
+
"CircleCI build status"
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.available_options
|
37
|
+
[
|
38
|
+
FastlaneCore::ConfigItem.new(key: :api_token,
|
39
|
+
env_name: "FL_GET_CIRCLE_CI_BUILD_STATUS_API_TOKEN",
|
40
|
+
description: "API Token for CircleCI API",
|
41
|
+
sensitive: true,
|
42
|
+
code_gen_sensitive: true,
|
43
|
+
is_string: true,
|
44
|
+
default_value: ENV["CIRCLE_CI_API_TOKEN"],
|
45
|
+
default_value_dynamic: true,
|
46
|
+
optional: false),
|
47
|
+
FastlaneCore::ConfigItem.new(key: :vcs_type,
|
48
|
+
env_name: "FL_GET_CIRCLE_CI_BUILD_STATUS_VCS_TYPE",
|
49
|
+
description: "CircleCI vcs type i.e github/bitbucket",
|
50
|
+
is_string: true,
|
51
|
+
default_value: "github"),
|
52
|
+
FastlaneCore::ConfigItem.new(key: :user_name,
|
53
|
+
env_name: "FL_GET_CIRCLE_CI_BUILD_STATUS_USER_NAME",
|
54
|
+
description: "CircleCI project repo user name i.e For github repo 'crazymanish/some_repo_name', user_name will be 'crazymanish'",
|
55
|
+
is_string: true,
|
56
|
+
optional: false),
|
57
|
+
FastlaneCore::ConfigItem.new(key: :project_name,
|
58
|
+
env_name: "FL_GET_CIRCLE_CI_BUILD_STATUS_PROJECT_NAME",
|
59
|
+
description: "CircleCI project repo project name i.e For github repo 'crazymanish/some_repo_name', project_name will be 'some_repo_name'",
|
60
|
+
is_string: true,
|
61
|
+
optional: false),
|
62
|
+
FastlaneCore::ConfigItem.new(key: :build_number,
|
63
|
+
env_name: "FL_GET_CIRCLE_CI_BUILD_STATUS_BUILD_NUMBER",
|
64
|
+
description: "CircleCI build number",
|
65
|
+
is_string: true,
|
66
|
+
optional: false)
|
67
|
+
]
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.output
|
71
|
+
[
|
72
|
+
['GET_CIRCLE_CI_BUILD_STATUS_RESULT', 'CircleCI build status']
|
73
|
+
]
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.return_value
|
77
|
+
"Returns the CircleCI build status."
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.example_code
|
81
|
+
[
|
82
|
+
'get_circle_ci_build_status(
|
83
|
+
user_name: "crazymanish",
|
84
|
+
project_name: "some_repo_name",
|
85
|
+
build_number: "1234"
|
86
|
+
)'
|
87
|
+
]
|
88
|
+
end
|
89
|
+
|
90
|
+
def self.authors
|
91
|
+
["crazymanish"]
|
92
|
+
end
|
93
|
+
|
94
|
+
def self.is_supported?(platform)
|
95
|
+
true
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require_relative '../helper/circle_ci_helper'
|
3
|
+
|
4
|
+
module Fastlane
|
5
|
+
module Actions
|
6
|
+
module SharedValues
|
7
|
+
TRIGGER_CIRCLE_CI_JOB_RESULT = :TRIGGER_CIRCLE_CI_JOB_RESULT
|
8
|
+
end
|
9
|
+
|
10
|
+
class TriggerCircleCiJobAction < Action
|
11
|
+
def self.run(params)
|
12
|
+
token = params[:api_token]
|
13
|
+
vcs = params[:vcs_type]
|
14
|
+
name = params[:user_name]
|
15
|
+
project = params[:project_name]
|
16
|
+
branch = params[:branch_name]
|
17
|
+
parameters = params[:build_parameters]
|
18
|
+
|
19
|
+
parameters[:CIRCLE_JOB] = params[:job_name]
|
20
|
+
# Remove any kv-pairs in the hash for which the value is nil (to not send keys with "null" as value).
|
21
|
+
parameters.delete_if { |k, v| v.nil? }
|
22
|
+
parameters = parameters.to_json
|
23
|
+
|
24
|
+
uri = "https://circleci.com"
|
25
|
+
api_url = "api/v1.1/project/#{vcs}/#{name}/#{project}/tree/#{branch}"
|
26
|
+
curl_command = "curl -X POST -u #{token}: -H 'Content-Type: application/json' -d '{\"build_parameters\": #{parameters}}' -s #{uri}/#{api_url}"
|
27
|
+
|
28
|
+
result = Actions::sh("#{curl_command}", log: false)
|
29
|
+
|
30
|
+
Actions.lane_context[SharedValues::TRIGGER_CIRCLE_CI_JOB_RESULT] = result
|
31
|
+
result
|
32
|
+
end
|
33
|
+
|
34
|
+
#####################################################
|
35
|
+
# @!group Documentation
|
36
|
+
#####################################################
|
37
|
+
|
38
|
+
def self.description
|
39
|
+
"Triggers a new CircleCI Job"
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.available_options
|
43
|
+
[
|
44
|
+
FastlaneCore::ConfigItem.new(key: :api_token,
|
45
|
+
env_name: "FL_TRIGGER_CIRCLE_CI_JOB_API_TOKEN",
|
46
|
+
description: "API Token for CircleCI API",
|
47
|
+
sensitive: true,
|
48
|
+
code_gen_sensitive: true,
|
49
|
+
is_string: true,
|
50
|
+
default_value: ENV["CIRCLE_CI_API_TOKEN"],
|
51
|
+
default_value_dynamic: true,
|
52
|
+
optional: false),
|
53
|
+
FastlaneCore::ConfigItem.new(key: :job_name,
|
54
|
+
env_name: "FL_TRIGGER_CIRCLE_CI_JOB_NAME",
|
55
|
+
description: "CircleCI job name usually defined under '.circleci/config.yml' file",
|
56
|
+
is_string: true,
|
57
|
+
optional: false),
|
58
|
+
FastlaneCore::ConfigItem.new(key: :vcs_type,
|
59
|
+
env_name: "FL_TRIGGER_CIRCLE_CI_JOB_VCS_TYPE",
|
60
|
+
description: "CircleCI vcs type i.e github/bitbucket",
|
61
|
+
is_string: true,
|
62
|
+
default_value: "github"),
|
63
|
+
FastlaneCore::ConfigItem.new(key: :user_name,
|
64
|
+
env_name: "FL_TRIGGER_CIRCLE_CI_JOB_USER_NAME",
|
65
|
+
description: "CircleCI project repo user name i.e For github repo 'crazymanish/some_repo_name', user_name will be 'crazymanish'",
|
66
|
+
is_string: true,
|
67
|
+
optional: false),
|
68
|
+
FastlaneCore::ConfigItem.new(key: :project_name,
|
69
|
+
env_name: "FL_TRIGGER_CIRCLE_CI_JOB_PROJECT_NAME",
|
70
|
+
description: "CircleCI project repo project name i.e For github repo 'crazymanish/some_repo_name', project_name will be 'some_repo_name'",
|
71
|
+
is_string: true,
|
72
|
+
optional: false),
|
73
|
+
FastlaneCore::ConfigItem.new(key: :branch_name,
|
74
|
+
env_name: "FL_TRIGGER_CIRCLE_CI_JOB_BRANCH_NAME",
|
75
|
+
description: "CircleCI branch name",
|
76
|
+
is_string: true,
|
77
|
+
default_value: "master"),
|
78
|
+
FastlaneCore::ConfigItem.new(key: :build_parameters,
|
79
|
+
env_name: "FL_TRIGGER_CIRCLE_CI_JOB_BUILD_PARAMETERS",
|
80
|
+
description: "Add additional build parameters, build_parameters must be a hash containing any key with any value",
|
81
|
+
default_value: {},
|
82
|
+
is_string: false)
|
83
|
+
]
|
84
|
+
end
|
85
|
+
|
86
|
+
def self.output
|
87
|
+
[
|
88
|
+
['TRIGGER_CIRCLE_CI_JOB_RESULT', 'Api response of new job trigger']
|
89
|
+
]
|
90
|
+
end
|
91
|
+
|
92
|
+
def self.return_value
|
93
|
+
"Returns the api response of new job trigger"
|
94
|
+
end
|
95
|
+
|
96
|
+
def self.example_code
|
97
|
+
[
|
98
|
+
'trigger_circle_ci_job(
|
99
|
+
job_name: "some_job_name",
|
100
|
+
user_name: "crazymanish",
|
101
|
+
project_name: "some_repo_name",
|
102
|
+
branch_name: "some_git_branch",
|
103
|
+
build_parameters: { # Optional, lets you specify any number of your own build parameters.
|
104
|
+
"RUN_EXTRA_TESTS" => "true",
|
105
|
+
"RUN_EXTRA_SOMETHING" => "something"
|
106
|
+
}
|
107
|
+
)'
|
108
|
+
]
|
109
|
+
end
|
110
|
+
|
111
|
+
def self.authors
|
112
|
+
["crazymanish"]
|
113
|
+
end
|
114
|
+
|
115
|
+
def self.is_supported?(platform)
|
116
|
+
true
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane_core/ui/ui'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
|
5
|
+
|
6
|
+
module Helper
|
7
|
+
class CircleCiHelper
|
8
|
+
# class methods that you define here become available in your action
|
9
|
+
# as `Helper::CircleCiHelper.your_method`
|
10
|
+
#
|
11
|
+
def self.show_message
|
12
|
+
UI.message("Hello from the circle_ci plugin helper!")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,177 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-circle_ci
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Manish Rathi
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-07-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: pry
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec_junit_formatter
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.49.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.49.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-require_tools
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: fastlane
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 2.150.1
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 2.150.1
|
139
|
+
description:
|
140
|
+
email: manishrathi19902013@gmail.com
|
141
|
+
executables: []
|
142
|
+
extensions: []
|
143
|
+
extra_rdoc_files: []
|
144
|
+
files:
|
145
|
+
- LICENSE
|
146
|
+
- README.md
|
147
|
+
- lib/fastlane/plugin/circle_ci.rb
|
148
|
+
- lib/fastlane/plugin/circle_ci/actions/download_circle_ci_artifact.rb
|
149
|
+
- lib/fastlane/plugin/circle_ci/actions/get_circle_ci_artifacts.rb
|
150
|
+
- lib/fastlane/plugin/circle_ci/actions/get_circle_ci_build_status.rb
|
151
|
+
- lib/fastlane/plugin/circle_ci/actions/trigger_circle_ci_job.rb
|
152
|
+
- lib/fastlane/plugin/circle_ci/helper/circle_ci_helper.rb
|
153
|
+
- lib/fastlane/plugin/circle_ci/version.rb
|
154
|
+
homepage: https://github.com/crazymanish/fastlane-plugin-circle_ci
|
155
|
+
licenses:
|
156
|
+
- MIT
|
157
|
+
metadata: {}
|
158
|
+
post_install_message:
|
159
|
+
rdoc_options: []
|
160
|
+
require_paths:
|
161
|
+
- lib
|
162
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
169
|
+
- - ">="
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '0'
|
172
|
+
requirements: []
|
173
|
+
rubygems_version: 3.0.3
|
174
|
+
signing_key:
|
175
|
+
specification_version: 4
|
176
|
+
summary: "A fastlane plugin for Circle CI. \U0001F680"
|
177
|
+
test_files: []
|