fastlane-plugin-jira_versions_v2 0.1.1
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 +54 -0
- data/lib/fastlane/plugin/jira_versions_v2/actions/create_jira_version.rb +181 -0
- data/lib/fastlane/plugin/jira_versions_v2/actions/get_jira_versions.rb +129 -0
- data/lib/fastlane/plugin/jira_versions_v2/actions/release_jira_version.rb +163 -0
- data/lib/fastlane/plugin/jira_versions_v2/helper/jira_versions_v2_helper.rb +12 -0
- data/lib/fastlane/plugin/jira_versions_v2/version.rb +5 -0
- data/lib/fastlane/plugin/jira_versions_v2.rb +16 -0
- metadata +147 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2bb030187e2889f79d27e0c820d52a4319c99252988f62b16ee07acb55c415de
|
4
|
+
data.tar.gz: 0d6f833272974a1d095b4437ed8cfcf32e6ddaf13741d8d359fb159d9df8a4d0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0d2304d943cfec6b77c8ccb975e71ef3c003815250ad8cfcc9d2e3d683fd101c84e91a99ccafa123479d2069be7be540b29d45083176dead2a7987b8da553a0b
|
7
|
+
data.tar.gz: ab1a02437308a34f8ad6460c7985d1a4c5a8dfff2e4cd5c5cbe60d383566f5eccd0766f8ff4fca122d197e58c49aa03b70f0c77e90ef9d12d23771e1a9506e17
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Sandy Chapman <sandychapman@gmail.com>
|
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,54 @@
|
|
1
|
+
# jira_versions_v2 plugin
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/fastlane-plugin-jira_versions)
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-jira_versions_v2`, add it to your project by running:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
fastlane add_plugin jira_versions_v2
|
11
|
+
```
|
12
|
+
|
13
|
+
## About jira_versions
|
14
|
+
|
15
|
+
Manage your JIRA project's releases/versions with this plugin.
|
16
|
+
|
17
|
+
Currently, jira_versions comes with two actions, `create_jira_version` and `release_jira_version`. The first will create a new version in your JIRA project and the second will release a version.
|
18
|
+
|
19
|
+
## Create Version 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`, modifying the placeholder variables in the Fastfile lane and running `bundle exec fastlane create_version`.
|
22
|
+
|
23
|
+
## Release Version Example
|
24
|
+
|
25
|
+
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins`, modifying the placeholder variables in the Fastfile lane and running `bundle exec fastlane release_version`.
|
26
|
+
|
27
|
+
## Run tests for this plugin
|
28
|
+
|
29
|
+
To run both the tests, and code style validation, run
|
30
|
+
|
31
|
+
```
|
32
|
+
rake
|
33
|
+
```
|
34
|
+
|
35
|
+
To automatically fix many of the styling issues, use
|
36
|
+
```
|
37
|
+
rubocop -a
|
38
|
+
```
|
39
|
+
|
40
|
+
## Issues and Feedback
|
41
|
+
|
42
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
43
|
+
|
44
|
+
## Troubleshooting
|
45
|
+
|
46
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/PluginsTroubleshooting.md) doc in the main `fastlane` repo.
|
47
|
+
|
48
|
+
## Using `fastlane` Plugins
|
49
|
+
|
50
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Plugins.md).
|
51
|
+
|
52
|
+
## About `fastlane`
|
53
|
+
|
54
|
+
`fastlane` is the easiest way to automate building and releasing your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
|
@@ -0,0 +1,181 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
module SharedValues
|
4
|
+
CREATE_JIRA_VERSION_VERSION_ID = :CREATE_JIRA_VERSION_VERSION_ID
|
5
|
+
end
|
6
|
+
|
7
|
+
class CreateJiraVersionAction < Action
|
8
|
+
def self.run(params)
|
9
|
+
Actions.verify_gem!('jira-ruby')
|
10
|
+
require 'jira-ruby'
|
11
|
+
|
12
|
+
site = params[:url]
|
13
|
+
context_path = ""
|
14
|
+
auth_type = :basic
|
15
|
+
username = params[:username]
|
16
|
+
password = params[:password]
|
17
|
+
project_name = params[:project_name]
|
18
|
+
project_id = params[:project_id]
|
19
|
+
name = params[:name]
|
20
|
+
description = params[:description]
|
21
|
+
archived = params[:archived]
|
22
|
+
released = params[:released]
|
23
|
+
start_date = params[:start_date]
|
24
|
+
use_ssl = params[:use_ssl]
|
25
|
+
|
26
|
+
options = {
|
27
|
+
username: username,
|
28
|
+
password: password,
|
29
|
+
site: site,
|
30
|
+
context_path: context_path,
|
31
|
+
auth_type: auth_type,
|
32
|
+
use_ssl: use_ssl,
|
33
|
+
read_timeout: 120
|
34
|
+
}
|
35
|
+
|
36
|
+
client = JIRA::Client.new(options)
|
37
|
+
|
38
|
+
unless project_name.nil?
|
39
|
+
project = client.Project.find(project_name)
|
40
|
+
project_id = project.id
|
41
|
+
end
|
42
|
+
|
43
|
+
if start_date.nil?
|
44
|
+
start_date = Date.today.to_s
|
45
|
+
end
|
46
|
+
|
47
|
+
version = client.Version.build
|
48
|
+
version.save!({
|
49
|
+
"description" => description,
|
50
|
+
"name" => name,
|
51
|
+
"archived" => archived,
|
52
|
+
"released" => released,
|
53
|
+
"startDate" => start_date,
|
54
|
+
"projectId" => project_id
|
55
|
+
})
|
56
|
+
version.fetch
|
57
|
+
Actions.lane_context[SharedValues::CREATE_JIRA_VERSION_VERSION_ID] = version.id
|
58
|
+
version.id
|
59
|
+
rescue
|
60
|
+
UI.user_error!("Failed to create new JIRA version: #{$!.response.body}")
|
61
|
+
false
|
62
|
+
end
|
63
|
+
|
64
|
+
#####################################################
|
65
|
+
# @!group Documentation
|
66
|
+
#####################################################
|
67
|
+
|
68
|
+
def self.description
|
69
|
+
"Creates a new version in your JIRA project"
|
70
|
+
end
|
71
|
+
|
72
|
+
def self.details
|
73
|
+
"Use this action to create a new version in JIRA"
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.available_options
|
77
|
+
[
|
78
|
+
FastlaneCore::ConfigItem.new(key: :url,
|
79
|
+
env_name: "FL_CREATE_JIRA_VERSION_SITE",
|
80
|
+
description: "URL for Jira instance",
|
81
|
+
type: String,
|
82
|
+
verify_block: proc do |value|
|
83
|
+
UI.user_error!("No url for Jira given, pass using `url: 'url'`") unless value and !value.empty?
|
84
|
+
end),
|
85
|
+
FastlaneCore::ConfigItem.new(key: :username,
|
86
|
+
env_name: "FL_CREATE_JIRA_VERSION_USERNAME",
|
87
|
+
description: "Username for JIRA instance",
|
88
|
+
type: String,
|
89
|
+
verify_block: proc do |value|
|
90
|
+
UI.user_error!("No username given, pass using `username: 'jira_user'`") unless value and !value.empty?
|
91
|
+
end),
|
92
|
+
FastlaneCore::ConfigItem.new(key: :password,
|
93
|
+
env_name: "FL_CREATE_JIRA_VERSION_PASSWORD",
|
94
|
+
description: "Password for Jira",
|
95
|
+
type: String,
|
96
|
+
verify_block: proc do |value|
|
97
|
+
UI.user_error!("No password given, pass using `password: 'T0PS3CR3T'`") unless value and !value.empty?
|
98
|
+
end),
|
99
|
+
FastlaneCore::ConfigItem.new(key: :project_name,
|
100
|
+
env_name: "FL_CREATE_JIRA_VERSION_PROJECT_NAME",
|
101
|
+
description: "Project ID for the JIRA project. E.g. the short abbreviation in the JIRA ticket tags",
|
102
|
+
type: String,
|
103
|
+
optional: true,
|
104
|
+
conflicting_options: [:project_id],
|
105
|
+
conflict_block: proc do |value|
|
106
|
+
UI.user_error!("You can't use 'project_name' and '#{project_id}' options in one run")
|
107
|
+
end,
|
108
|
+
verify_block: proc do |value|
|
109
|
+
UI.user_error!("No Project ID given, pass using `project_id: 'PROJID'`") unless value and !value.empty?
|
110
|
+
end),
|
111
|
+
FastlaneCore::ConfigItem.new(key: :project_id,
|
112
|
+
env_name: "FL_CREATE_JIRA_VERSION_PROJECT_ID",
|
113
|
+
description: "Project ID for the JIRA project. E.g. the short abbreviation in the JIRA ticket tags",
|
114
|
+
type: String,
|
115
|
+
optional: true,
|
116
|
+
conflicting_options: [:project_name],
|
117
|
+
conflict_block: proc do |value|
|
118
|
+
UI.user_error!("You can't use 'project_id' and '#{project_name}' options in one run")
|
119
|
+
end,
|
120
|
+
verify_block: proc do |value|
|
121
|
+
UI.user_error!("No Project ID given, pass using `project_id: 'PROJID'`") unless value and !value.empty?
|
122
|
+
end),
|
123
|
+
FastlaneCore::ConfigItem.new(key: :name,
|
124
|
+
env_name: "FL_CREATE_JIRA_VERSION_NAME",
|
125
|
+
description: "The name of the version. E.g. 1.0.0",
|
126
|
+
type: String,
|
127
|
+
verify_block: proc do |value|
|
128
|
+
UI.user_error!("No version name given, pass using `name: '1.0.0'`") unless value and !value.empty?
|
129
|
+
end),
|
130
|
+
FastlaneCore::ConfigItem.new(key: :description,
|
131
|
+
env_name: "FL_CREATE_JIRA_VERSION_DESCRIPTION",
|
132
|
+
description: "The description of the JIRA project version",
|
133
|
+
type: String,
|
134
|
+
optional: true,
|
135
|
+
default_value: ''),
|
136
|
+
FastlaneCore::ConfigItem.new(key: :archived,
|
137
|
+
env_name: "FL_CREATE_JIRA_VERSION_ARCHIVED",
|
138
|
+
description: "Whether the version should be archived",
|
139
|
+
optional: true,
|
140
|
+
default_value: false),
|
141
|
+
FastlaneCore::ConfigItem.new(key: :released,
|
142
|
+
env_name: "FL_CREATE_JIRA_VERSION_CREATED",
|
143
|
+
description: "Whether the version should be released",
|
144
|
+
optional: true,
|
145
|
+
default_value: false),
|
146
|
+
FastlaneCore::ConfigItem.new(key: :start_date,
|
147
|
+
env_name: "FL_CREATE_JIRA_VERSION_START_DATE",
|
148
|
+
description: "The date this version will start on",
|
149
|
+
type: String,
|
150
|
+
is_string: true,
|
151
|
+
optional: true,
|
152
|
+
default_value: Date.today.to_s),
|
153
|
+
FastlaneCore::ConfigItem.new(key: :use_ssl,
|
154
|
+
env_name: "FL_CREATE_JIRA_VERSION_USE_SSL",
|
155
|
+
description: "If true communication with jira will be done by using https",
|
156
|
+
is_string: false,
|
157
|
+
optional: true,
|
158
|
+
default_value: true)
|
159
|
+
]
|
160
|
+
end
|
161
|
+
|
162
|
+
def self.output
|
163
|
+
[
|
164
|
+
['CREATE_JIRA_VERSION_VERSION_ID', 'The versionId for the newly created JIRA project version']
|
165
|
+
]
|
166
|
+
end
|
167
|
+
|
168
|
+
def self.return_value
|
169
|
+
'The versionId for the newly create JIRA project version'
|
170
|
+
end
|
171
|
+
|
172
|
+
def self.authors
|
173
|
+
["https://github.com/SandyChapman"]
|
174
|
+
end
|
175
|
+
|
176
|
+
def self.is_supported?(platform)
|
177
|
+
true
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
@@ -0,0 +1,129 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
module SharedValues
|
4
|
+
GET_JIRA_VERSION_NAMES = :GET_JIRA_VERSION_NAMES
|
5
|
+
end
|
6
|
+
|
7
|
+
class GetJiraVersionsAction < Action
|
8
|
+
def self.run(params)
|
9
|
+
Actions.verify_gem!('jira-ruby')
|
10
|
+
require 'jira-ruby'
|
11
|
+
|
12
|
+
site = params[:url]
|
13
|
+
context_path = ""
|
14
|
+
auth_type = :basic
|
15
|
+
username = params[:username]
|
16
|
+
password = params[:password]
|
17
|
+
project_name = params[:project_name]
|
18
|
+
project_id = params[:project_id]
|
19
|
+
use_ssl = params[:use_ssl]
|
20
|
+
|
21
|
+
options = {
|
22
|
+
username: username,
|
23
|
+
password: password,
|
24
|
+
site: site,
|
25
|
+
context_path: context_path,
|
26
|
+
auth_type: auth_type,
|
27
|
+
use_ssl: use_ssl,
|
28
|
+
read_timeout: 120
|
29
|
+
}
|
30
|
+
|
31
|
+
client = JIRA::Client.new(options)
|
32
|
+
|
33
|
+
unless project_name.nil?
|
34
|
+
project = client.Project.find(project_name)
|
35
|
+
end
|
36
|
+
|
37
|
+
version_names = project.versions.map { |version| version.name }
|
38
|
+
Actions.lane_context[SharedValues::GET_JIRA_VERSION_NAMES] = version_names
|
39
|
+
return version_names
|
40
|
+
end
|
41
|
+
|
42
|
+
#####################################################
|
43
|
+
# @!group Documentation
|
44
|
+
#####################################################
|
45
|
+
|
46
|
+
def self.description
|
47
|
+
"Gets a list of all versions for a JIRA project"
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.details
|
51
|
+
"Use this action to get a list of all version names for a JIRA project"
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.available_options
|
55
|
+
[
|
56
|
+
FastlaneCore::ConfigItem.new(key: :url,
|
57
|
+
env_name: "FL_GET_JIRA_VERSIONS_SITE",
|
58
|
+
description: "URL for Jira instance",
|
59
|
+
type: String,
|
60
|
+
verify_block: proc do |value|
|
61
|
+
UI.user_error!("No url for Jira given, pass using `url: 'url'`") unless value and !value.empty?
|
62
|
+
end),
|
63
|
+
FastlaneCore::ConfigItem.new(key: :username,
|
64
|
+
env_name: "FL_GET_JIRA_VERSIONS_USERNAME",
|
65
|
+
description: "Username for JIRA instance",
|
66
|
+
type: String,
|
67
|
+
verify_block: proc do |value|
|
68
|
+
UI.user_error!("No username given, pass using `username: 'jira_user'`") unless value and !value.empty?
|
69
|
+
end),
|
70
|
+
FastlaneCore::ConfigItem.new(key: :password,
|
71
|
+
env_name: "FL_GET_JIRA_VERSIONS_PASSWORD",
|
72
|
+
description: "Password for Jira",
|
73
|
+
type: String,
|
74
|
+
verify_block: proc do |value|
|
75
|
+
UI.user_error!("No password given, pass using `password: 'T0PS3CR3T'`") unless value and !value.empty?
|
76
|
+
end),
|
77
|
+
FastlaneCore::ConfigItem.new(key: :project_name,
|
78
|
+
env_name: "FL_GET_JIRA_VERSIONS_PROJECT_NAME",
|
79
|
+
description: "Project ID for the JIRA project. E.g. the short abbreviation in the JIRA ticket tags",
|
80
|
+
type: String,
|
81
|
+
optional: true,
|
82
|
+
conflicting_options: [:project_id],
|
83
|
+
conflict_block: proc do |value|
|
84
|
+
UI.user_error!("You can't use 'project_name' and '#{project_id}' options in one run")
|
85
|
+
end,
|
86
|
+
verify_block: proc do |value|
|
87
|
+
UI.user_error!("No Project ID given, pass using `project_id: 'PROJID'`") unless value and !value.empty?
|
88
|
+
end),
|
89
|
+
FastlaneCore::ConfigItem.new(key: :project_id,
|
90
|
+
env_name: "FL_GET_JIRA_VERSIONS_PROJECT_ID",
|
91
|
+
description: "Project ID for the JIRA project. E.g. the short abbreviation in the JIRA ticket tags",
|
92
|
+
type: String,
|
93
|
+
optional: true,
|
94
|
+
conflicting_options: [:project_name],
|
95
|
+
conflict_block: proc do |value|
|
96
|
+
UI.user_error!("You can't use 'project_id' and '#{project_name}' options in one run")
|
97
|
+
end,
|
98
|
+
verify_block: proc do |value|
|
99
|
+
UI.user_error!("No Project ID given, pass using `project_id: 'PROJID'`") unless value and !value.empty?
|
100
|
+
end),
|
101
|
+
FastlaneCore::ConfigItem.new(key: :use_ssl,
|
102
|
+
env_name: "FL_GET_JIRA_VERSIONS_USE_SSL",
|
103
|
+
description: "If true communication with jira will be done by using https",
|
104
|
+
is_string: false,
|
105
|
+
optional: true,
|
106
|
+
default_value: true)
|
107
|
+
]
|
108
|
+
end
|
109
|
+
|
110
|
+
def self.output
|
111
|
+
[
|
112
|
+
['GET_JIRA_VERSION_NAMES', 'A collection of all available version names for the given project']
|
113
|
+
]
|
114
|
+
end
|
115
|
+
|
116
|
+
def self.return_value
|
117
|
+
'A collection of all available version names for the given project'
|
118
|
+
end
|
119
|
+
|
120
|
+
def self.authors
|
121
|
+
["Sascha Held"]
|
122
|
+
end
|
123
|
+
|
124
|
+
def self.is_supported?(platform)
|
125
|
+
true
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
@@ -0,0 +1,163 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
module SharedValues
|
4
|
+
RELEASE_JIRA_VERSION_VERSION_ID = :RELEASE_JIRA_VERSION_VERSION_ID
|
5
|
+
end
|
6
|
+
|
7
|
+
class ReleaseJiraVersionAction < Action
|
8
|
+
def self.run(params)
|
9
|
+
Actions.verify_gem!('jira-ruby')
|
10
|
+
require 'jira-ruby'
|
11
|
+
|
12
|
+
site = params[:url]
|
13
|
+
context_path = ""
|
14
|
+
auth_type = :basic
|
15
|
+
username = params[:username]
|
16
|
+
password = params[:password]
|
17
|
+
project_name = params[:project_name]
|
18
|
+
project_id = params[:project_id]
|
19
|
+
name = params[:name]
|
20
|
+
release_date = params[:release_date]
|
21
|
+
use_ssl = params[:use_ssl]
|
22
|
+
released = true
|
23
|
+
|
24
|
+
options = {
|
25
|
+
username: username,
|
26
|
+
password: password,
|
27
|
+
site: site,
|
28
|
+
context_path: context_path,
|
29
|
+
auth_type: auth_type,
|
30
|
+
use_ssl: use_ssl,
|
31
|
+
read_timeout: 120
|
32
|
+
}
|
33
|
+
|
34
|
+
client = JIRA::Client.new(options)
|
35
|
+
|
36
|
+
unless project_name.nil?
|
37
|
+
project = client.Project.find(project_name)
|
38
|
+
project_id = project.id
|
39
|
+
end
|
40
|
+
|
41
|
+
version = project.versions.find { |version| version.name == name }
|
42
|
+
if version.nil?
|
43
|
+
raise "Version '#{name}' not found."
|
44
|
+
return false
|
45
|
+
end
|
46
|
+
version.save!({
|
47
|
+
"released" => released,
|
48
|
+
"releaseDate" => release_date,
|
49
|
+
"projectId" => project_id
|
50
|
+
})
|
51
|
+
version.fetch
|
52
|
+
Actions.lane_context[SharedValues::RELEASE_JIRA_VERSION_VERSION_ID] = version.id
|
53
|
+
version.id
|
54
|
+
rescue RuntimeError
|
55
|
+
UI.user_error!("#{$!}")
|
56
|
+
false
|
57
|
+
rescue JIRA::HTTPError
|
58
|
+
UI.user_error!("Failed to release new JIRA version: #{$!.response.body}")
|
59
|
+
false
|
60
|
+
end
|
61
|
+
|
62
|
+
#####################################################
|
63
|
+
# @!group Documentation
|
64
|
+
#####################################################
|
65
|
+
|
66
|
+
def self.description
|
67
|
+
"Releases a version in your JIRA project"
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.details
|
71
|
+
"Use this action to release a version in JIRA"
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.available_options
|
75
|
+
[
|
76
|
+
FastlaneCore::ConfigItem.new(key: :url,
|
77
|
+
env_name: "FL_RELEASE_JIRA_VERSION_SITE",
|
78
|
+
description: "URL for Jira instance",
|
79
|
+
type: String,
|
80
|
+
verify_block: proc do |value|
|
81
|
+
UI.user_error!("No url for Jira given, pass using `url: 'url'`") unless value and !value.empty?
|
82
|
+
end),
|
83
|
+
FastlaneCore::ConfigItem.new(key: :username,
|
84
|
+
env_name: "FL_RELEASE_JIRA_VERSION_USERNAME",
|
85
|
+
description: "Username for JIRA instance",
|
86
|
+
type: String,
|
87
|
+
verify_block: proc do |value|
|
88
|
+
UI.user_error!("No username given, pass using `username: 'jira_user'`") unless value and !value.empty?
|
89
|
+
end),
|
90
|
+
FastlaneCore::ConfigItem.new(key: :password,
|
91
|
+
env_name: "FL_RELEASE_JIRA_VERSION_PASSWORD",
|
92
|
+
description: "Password for Jira",
|
93
|
+
type: String,
|
94
|
+
verify_block: proc do |value|
|
95
|
+
UI.user_error!("No password given, pass using `password: 'T0PS3CR3T'`") unless value and !value.empty?
|
96
|
+
end),
|
97
|
+
FastlaneCore::ConfigItem.new(key: :project_name,
|
98
|
+
env_name: "FL_RELEASE_JIRA_VERSION_PROJECT_NAME",
|
99
|
+
description: "Project ID for the JIRA project. E.g. the short abbreviation in the JIRA ticket tags",
|
100
|
+
type: String,
|
101
|
+
optional: true,
|
102
|
+
conflicting_options: [:project_id],
|
103
|
+
conflict_block: proc do |value|
|
104
|
+
UI.user_error!("You can't use 'project_name' and '#{project_id}' options in one run")
|
105
|
+
end,
|
106
|
+
verify_block: proc do |value|
|
107
|
+
UI.user_error!("No Project ID given, pass using `project_id: 'PROJID'`") unless value and !value.empty?
|
108
|
+
end),
|
109
|
+
FastlaneCore::ConfigItem.new(key: :project_id,
|
110
|
+
env_name: "FL_RELEASE_JIRA_VERSION_PROJECT_ID",
|
111
|
+
description: "Project ID for the JIRA project. E.g. the short abbreviation in the JIRA ticket tags",
|
112
|
+
type: String,
|
113
|
+
optional: true,
|
114
|
+
conflicting_options: [:project_name],
|
115
|
+
conflict_block: proc do |value|
|
116
|
+
UI.user_error!("You can't use 'project_id' and '#{project_name}' options in one run")
|
117
|
+
end,
|
118
|
+
verify_block: proc do |value|
|
119
|
+
UI.user_error!("No Project ID given, pass using `project_id: 'PROJID'`") unless value and !value.empty?
|
120
|
+
end),
|
121
|
+
FastlaneCore::ConfigItem.new(key: :name,
|
122
|
+
env_name: "FL_RELEASE_JIRA_VERSION_NAME",
|
123
|
+
description: "The name of the version. E.g. 1.0.0",
|
124
|
+
type: String,
|
125
|
+
verify_block: proc do |value|
|
126
|
+
UI.user_error!("No version name given, pass using `name: '1.0.0'`") unless value and !value.empty?
|
127
|
+
end),
|
128
|
+
FastlaneCore::ConfigItem.new(key: :release_date,
|
129
|
+
env_name: "FL_CREATE_JIRA_VERSION_RELEASE_DATE",
|
130
|
+
description: "The date this version ended on",
|
131
|
+
type: String,
|
132
|
+
is_string: true,
|
133
|
+
optional: true,
|
134
|
+
default_value: Date.today.to_s),
|
135
|
+
FastlaneCore::ConfigItem.new(key: :use_ssl,
|
136
|
+
env_name: "FL_CREATE_JIRA_VERSION_USE_SSL",
|
137
|
+
description: "If true communication with jira will be done by using https",
|
138
|
+
is_string: false,
|
139
|
+
optional: true,
|
140
|
+
default_value: true)
|
141
|
+
]
|
142
|
+
end
|
143
|
+
|
144
|
+
def self.output
|
145
|
+
[
|
146
|
+
['RELEASE_JIRA_VERSION_VERSION_ID', 'The versionId for the newly released JIRA project version']
|
147
|
+
]
|
148
|
+
end
|
149
|
+
|
150
|
+
def self.return_value
|
151
|
+
'The versionId for the newly release JIRA project version'
|
152
|
+
end
|
153
|
+
|
154
|
+
def self.authors
|
155
|
+
["https://github.com/SandyChapman"]
|
156
|
+
end
|
157
|
+
|
158
|
+
def self.is_supported?(platform)
|
159
|
+
true
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Helper
|
3
|
+
class JiraVersionsV2Helper
|
4
|
+
# class methods that you define here become available in your action
|
5
|
+
# as `Helper::JiraVersionsHelper.your_method`
|
6
|
+
#
|
7
|
+
# def self.show_message
|
8
|
+
# UI.message("Hello from the jira_versions plugin helper!")
|
9
|
+
# end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane/plugin/jira_versions_v2/version'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module JiraVersionsV2
|
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::JiraVersionsV2.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,147 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-jira_versions_v2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sandy Chapman
|
8
|
+
- Luca Tagliabue
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2025-03-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jira-ruby
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.2.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
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: bundler
|
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
|
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'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: fastlane
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.226.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.226.0
|
111
|
+
email:
|
112
|
+
- sandychapman@gmail.com
|
113
|
+
- homobonus.luca@gmail.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- LICENSE
|
119
|
+
- README.md
|
120
|
+
- lib/fastlane/plugin/jira_versions_v2.rb
|
121
|
+
- lib/fastlane/plugin/jira_versions_v2/actions/create_jira_version.rb
|
122
|
+
- lib/fastlane/plugin/jira_versions_v2/actions/get_jira_versions.rb
|
123
|
+
- lib/fastlane/plugin/jira_versions_v2/actions/release_jira_version.rb
|
124
|
+
- lib/fastlane/plugin/jira_versions_v2/helper/jira_versions_v2_helper.rb
|
125
|
+
- lib/fastlane/plugin/jira_versions_v2/version.rb
|
126
|
+
homepage: https://github.com/lukluca/fastlane-plugin-jira_versions_v2
|
127
|
+
licenses:
|
128
|
+
- MIT
|
129
|
+
metadata: {}
|
130
|
+
rdoc_options: []
|
131
|
+
require_paths:
|
132
|
+
- lib
|
133
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
|
+
requirements:
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
143
|
+
requirements: []
|
144
|
+
rubygems_version: 3.6.3
|
145
|
+
specification_version: 4
|
146
|
+
summary: Manage your JIRA project's releases/versions with this plugin.
|
147
|
+
test_files: []
|