pantograph 0.1.12 → 0.1.13
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 +4 -4
- data/pantograph/lib/pantograph/actions/artifactory.rb +15 -15
- data/pantograph/lib/pantograph/actions/bundle_install.rb +33 -33
- data/pantograph/lib/pantograph/actions/changelog_from_git_commits.rb +14 -14
- data/pantograph/lib/pantograph/actions/cloc.rb +15 -15
- data/pantograph/lib/pantograph/actions/danger.rb +26 -26
- data/pantograph/lib/pantograph/actions/download.rb +3 -3
- data/pantograph/lib/pantograph/actions/ensure_git_branch.rb +4 -4
- data/pantograph/lib/pantograph/actions/ensure_git_status_clean.rb +10 -10
- data/pantograph/lib/pantograph/actions/erb.rb +12 -12
- data/pantograph/lib/pantograph/actions/get_github_release.rb +10 -10
- data/pantograph/lib/pantograph/actions/github_api.rb +20 -20
- data/pantograph/lib/pantograph/actions/gradle.rb +67 -85
- data/pantograph/lib/pantograph/actions/jira.rb +14 -14
- data/pantograph/lib/pantograph/actions/make_changelog_from_jenkins.rb +9 -9
- data/pantograph/lib/pantograph/actions/nexus_upload.rb +37 -37
- data/pantograph/lib/pantograph/actions/number_of_commits.rb +6 -6
- data/pantograph/lib/pantograph/actions/push_git_tags.rb +7 -7
- data/pantograph/lib/pantograph/actions/push_to_git_remote.rb +19 -19
- data/pantograph/lib/pantograph/actions/reset_git_repo.rb +9 -9
- data/pantograph/lib/pantograph/actions/rsync.rb +14 -14
- data/pantograph/lib/pantograph/actions/set_github_release.rb +19 -19
- data/pantograph/lib/pantograph/actions/slack.rb +28 -28
- data/pantograph/lib/pantograph/actions/sonar.rb +32 -32
- data/pantograph/lib/pantograph/actions/ssh.rb +22 -22
- data/pantograph/lib/pantograph/actions/twitter.rb +14 -14
- data/pantograph/lib/pantograph/actions/update_pantograph.rb +16 -16
- data/pantograph/lib/pantograph/actions/zip.rb +12 -12
- data/pantograph/lib/pantograph/helper/gradle_helper.rb +2 -3
- data/pantograph/lib/pantograph/junit_generator.rb +1 -1
- data/pantograph/lib/pantograph/lane_manager.rb +1 -1
- data/pantograph/lib/pantograph/plugins/template/.rubocop.yml +2 -0
- data/pantograph/lib/pantograph/setup/setup.rb +6 -6
- data/pantograph/lib/pantograph/version.rb +1 -1
- data/pantograph_core/lib/pantograph_core/helper.rb +1 -1
- data/pantograph_core/lib/pantograph_core/print_table.rb +1 -1
- data/pantograph_core/lib/pantograph_core/swag.rb +2 -2
- metadata +2 -2
@@ -38,40 +38,40 @@ module Pantograph
|
|
38
38
|
def self.available_options
|
39
39
|
[
|
40
40
|
PantographCore::ConfigItem.new(key: :url,
|
41
|
-
env_name:
|
42
|
-
description:
|
41
|
+
env_name: 'JIRA_SITE',
|
42
|
+
description: 'URL for Jira instance',
|
43
43
|
verify_block: proc do |value|
|
44
44
|
UI.user_error!("No url for Jira given, pass using `url: 'url'`") if value.to_s.length == 0
|
45
45
|
end),
|
46
46
|
PantographCore::ConfigItem.new(key: :context_path,
|
47
|
-
env_name:
|
47
|
+
env_name: 'JIRA_CONTEXT_PATH',
|
48
48
|
description: "Appends to the url (ex: \"/jira\")",
|
49
49
|
optional: true,
|
50
50
|
default_value: ""),
|
51
51
|
PantographCore::ConfigItem.new(key: :username,
|
52
|
-
env_name:
|
53
|
-
description:
|
52
|
+
env_name: 'JIRA_USERNAME',
|
53
|
+
description: 'Username for JIRA instance',
|
54
54
|
verify_block: proc do |value|
|
55
|
-
UI.user_error!(
|
55
|
+
UI.user_error!('No username') if value.to_s.length == 0
|
56
56
|
end),
|
57
57
|
PantographCore::ConfigItem.new(key: :password,
|
58
|
-
env_name:
|
59
|
-
description:
|
58
|
+
env_name: 'JIRA_PASSWORD',
|
59
|
+
description: 'Password for Jira',
|
60
60
|
sensitive: true,
|
61
61
|
verify_block: proc do |value|
|
62
62
|
UI.user_error!("No password") if value.to_s.length == 0
|
63
63
|
end),
|
64
64
|
PantographCore::ConfigItem.new(key: :ticket_id,
|
65
|
-
env_name:
|
66
|
-
description:
|
65
|
+
env_name: 'JIRA_TICKET_ID',
|
66
|
+
description: 'Ticket ID for Jira, i.e. APP-123',
|
67
67
|
verify_block: proc do |value|
|
68
68
|
UI.user_error!("No Ticket specified") if value.to_s.length == 0
|
69
69
|
end),
|
70
70
|
PantographCore::ConfigItem.new(key: :comment_text,
|
71
|
-
env_name:
|
72
|
-
description:
|
71
|
+
env_name: 'JIRA_COMMENT_TEXT',
|
72
|
+
description: 'Text to add to the ticket as a comment',
|
73
73
|
verify_block: proc do |value|
|
74
|
-
UI.user_error!(
|
74
|
+
UI.user_error!('No comment specified') if value.to_s.length == 0
|
75
75
|
end)
|
76
76
|
]
|
77
77
|
end
|
@@ -80,7 +80,7 @@ module Pantograph
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def self.authors
|
83
|
-
[
|
83
|
+
['iAmChrisTruman']
|
84
84
|
end
|
85
85
|
|
86
86
|
def self.is_supported?(platform)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Pantograph
|
2
2
|
module Actions
|
3
3
|
module SharedValues
|
4
|
-
|
4
|
+
PANT_CHANGELOG ||= :PANT_CHANGELOG # originally defined in ChangelogFromGitCommitsAction
|
5
5
|
end
|
6
6
|
|
7
7
|
class MakeChangelogFromJenkinsAction < Action
|
@@ -25,25 +25,25 @@ module Pantograph
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
Actions.lane_context[SharedValues::
|
28
|
+
Actions.lane_context[SharedValues::PANT_CHANGELOG] = changelog.strip.length > 0 ? changelog : params[:fallback_changelog]
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.description
|
32
|
-
|
32
|
+
'Generate a changelog using the Changes section from the current Jenkins build'
|
33
33
|
end
|
34
34
|
|
35
35
|
def self.details
|
36
|
-
|
36
|
+
'This is useful when deploying automated builds. The changelog from Jenkins lists all the commit messages since the last build.'
|
37
37
|
end
|
38
38
|
|
39
39
|
def self.available_options
|
40
40
|
[
|
41
41
|
PantographCore::ConfigItem.new(key: :fallback_changelog,
|
42
|
-
description:
|
42
|
+
description: 'Fallback changelog if there is not one on Jenkins, or it could not be read',
|
43
43
|
optional: true,
|
44
|
-
default_value:
|
44
|
+
default_value: ''),
|
45
45
|
PantographCore::ConfigItem.new(key: :include_commit_body,
|
46
|
-
description:
|
46
|
+
description: 'Include the commit body along with the summary',
|
47
47
|
optional: true,
|
48
48
|
is_string: false,
|
49
49
|
default_value: true)
|
@@ -52,12 +52,12 @@ module Pantograph
|
|
52
52
|
|
53
53
|
def self.output
|
54
54
|
[
|
55
|
-
['
|
55
|
+
['PANT_CHANGELOG', 'The changelog generated by Jenkins']
|
56
56
|
]
|
57
57
|
end
|
58
58
|
|
59
59
|
def self.authors
|
60
|
-
[
|
60
|
+
['mandrizzle']
|
61
61
|
end
|
62
62
|
|
63
63
|
def self.is_supported?(platform)
|
@@ -89,65 +89,65 @@ module Pantograph
|
|
89
89
|
#####################################################
|
90
90
|
|
91
91
|
def self.description
|
92
|
-
|
92
|
+
'Upload a file to [Sonatype Nexus platform](https://www.sonatype.com)'
|
93
93
|
end
|
94
94
|
|
95
95
|
def self.available_options
|
96
96
|
[
|
97
97
|
PantographCore::ConfigItem.new(key: :file,
|
98
|
-
env_name:
|
99
|
-
description:
|
98
|
+
env_name: 'NEXUS_FILE',
|
99
|
+
description: 'File to be uploaded to Nexus',
|
100
100
|
optional: false,
|
101
101
|
verify_block: proc do |value|
|
102
102
|
file_path = File.expand_path(value)
|
103
103
|
UI.user_error!("Couldn't find file at path '#{file_path}'") unless File.exist?(file_path)
|
104
104
|
end),
|
105
105
|
PantographCore::ConfigItem.new(key: :repo_id,
|
106
|
-
env_name:
|
107
|
-
description:
|
106
|
+
env_name: 'NEXUS_REPO_ID',
|
107
|
+
description: 'Nexus repository id e.g. artefacts',
|
108
108
|
optional: false),
|
109
109
|
PantographCore::ConfigItem.new(key: :repo_group_id,
|
110
|
-
env_name:
|
111
|
-
description:
|
110
|
+
env_name: 'NEXUS_REPO_GROUP_ID',
|
111
|
+
description: 'Nexus repository group id e.g. com.company',
|
112
112
|
optional: false),
|
113
113
|
PantographCore::ConfigItem.new(key: :repo_project_name,
|
114
|
-
env_name:
|
115
|
-
description:
|
114
|
+
env_name: 'NEXUS_REPO_PROJECT_NAME',
|
115
|
+
description: 'Nexus repository commandect name. Only letters, digits, underscores(_), hyphens(-), and dots(.) are allowed',
|
116
116
|
optional: false),
|
117
117
|
PantographCore::ConfigItem.new(key: :repo_project_version,
|
118
|
-
env_name:
|
119
|
-
description:
|
118
|
+
env_name: 'NEXUS_REPO_PROJECT_VERSION',
|
119
|
+
description: 'Nexus repository commandect version',
|
120
120
|
optional: false),
|
121
121
|
PantographCore::ConfigItem.new(key: :repo_classifier,
|
122
|
-
env_name:
|
123
|
-
description:
|
122
|
+
env_name: 'NEXUS_REPO_CLASSIFIER',
|
123
|
+
description: 'Nexus repository artifact classifier (optional)',
|
124
124
|
optional: true),
|
125
125
|
PantographCore::ConfigItem.new(key: :endpoint,
|
126
|
-
env_name:
|
127
|
-
description:
|
126
|
+
env_name: 'NEXUS_ENDPOINT',
|
127
|
+
description: 'Nexus endpoint e.g. http://nexus:8081',
|
128
128
|
optional: false),
|
129
129
|
PantographCore::ConfigItem.new(key: :mount_path,
|
130
|
-
env_name:
|
131
|
-
description:
|
132
|
-
default_value:
|
130
|
+
env_name: 'NEXUS_MOUNT_PATH',
|
131
|
+
description: 'Nexus mount path (Nexus 3 instances have this configured as empty by default)',
|
132
|
+
default_value: '/nexus',
|
133
133
|
optional: true),
|
134
134
|
PantographCore::ConfigItem.new(key: :username,
|
135
|
-
env_name:
|
136
|
-
description:
|
135
|
+
env_name: 'NEXUS_USERNAME',
|
136
|
+
description: 'Nexus username',
|
137
137
|
optional: false),
|
138
138
|
PantographCore::ConfigItem.new(key: :password,
|
139
|
-
env_name:
|
140
|
-
description:
|
139
|
+
env_name: 'NEXUS_PASSWORD',
|
140
|
+
description: 'Nexus password',
|
141
141
|
optional: false),
|
142
142
|
PantographCore::ConfigItem.new(key: :ssl_verify,
|
143
|
-
env_name:
|
144
|
-
description:
|
143
|
+
env_name: 'NEXUS_SSL_VERIFY',
|
144
|
+
description: 'Verify SSL',
|
145
145
|
is_string: false,
|
146
146
|
default_value: true,
|
147
147
|
optional: true),
|
148
148
|
PantographCore::ConfigItem.new(key: :nexus_version,
|
149
|
-
env_name:
|
150
|
-
description:
|
149
|
+
env_name: 'NEXUS_MAJOR_VERSION',
|
150
|
+
description: 'Nexus major version',
|
151
151
|
type: Integer,
|
152
152
|
default_value: 2,
|
153
153
|
optional: true,
|
@@ -158,33 +158,33 @@ module Pantograph
|
|
158
158
|
UI.user_error!("Unsupported version (#{value}) max. supported version: #{max_version}") unless value <= max_version
|
159
159
|
end),
|
160
160
|
PantographCore::ConfigItem.new(key: :verbose,
|
161
|
-
env_name:
|
162
|
-
description:
|
161
|
+
env_name: 'NEXUS_VERBOSE',
|
162
|
+
description: 'Make detailed output',
|
163
163
|
is_string: false,
|
164
164
|
default_value: false,
|
165
165
|
optional: true),
|
166
166
|
PantographCore::ConfigItem.new(key: :proxy_username,
|
167
|
-
env_name:
|
168
|
-
description:
|
167
|
+
env_name: 'NEXUS_PROXY_USERNAME',
|
168
|
+
description: 'Proxy username',
|
169
169
|
optional: true),
|
170
170
|
PantographCore::ConfigItem.new(key: :proxy_password,
|
171
|
-
env_name:
|
171
|
+
env_name: 'NEXUS_PROXY_PASSWORD',
|
172
172
|
sensitive: true,
|
173
|
-
description:
|
173
|
+
description: 'Proxy password',
|
174
174
|
optional: true),
|
175
175
|
PantographCore::ConfigItem.new(key: :proxy_address,
|
176
|
-
env_name:
|
177
|
-
description:
|
176
|
+
env_name: 'NEXUS_PROXY_ADDRESS',
|
177
|
+
description: 'Proxy address',
|
178
178
|
optional: true),
|
179
179
|
PantographCore::ConfigItem.new(key: :proxy_port,
|
180
|
-
env_name:
|
181
|
-
description:
|
180
|
+
env_name: 'NEXUS_PROXY_PORT',
|
181
|
+
description: 'Proxy port',
|
182
182
|
optional: true)
|
183
183
|
]
|
184
184
|
end
|
185
185
|
|
186
186
|
def self.authors
|
187
|
-
[
|
187
|
+
['xfreebird', 'mdio']
|
188
188
|
end
|
189
189
|
|
190
190
|
def self.is_supported?(platform)
|
@@ -26,11 +26,11 @@ module Pantograph
|
|
26
26
|
#####################################################
|
27
27
|
|
28
28
|
def self.description
|
29
|
-
|
29
|
+
'Return the number of commits in current git branch'
|
30
30
|
end
|
31
31
|
|
32
32
|
def self.return_value
|
33
|
-
|
33
|
+
'The total number of all commits in current git branch'
|
34
34
|
end
|
35
35
|
|
36
36
|
def self.return_type
|
@@ -40,19 +40,19 @@ module Pantograph
|
|
40
40
|
def self.available_options
|
41
41
|
[
|
42
42
|
PantographCore::ConfigItem.new(key: :all,
|
43
|
-
env_name:
|
43
|
+
env_name: 'NUMBER_OF_COMMITS_ALL',
|
44
44
|
optional: true,
|
45
45
|
is_string: false,
|
46
|
-
description:
|
46
|
+
description: 'Returns number of all commits instead of current branch')
|
47
47
|
]
|
48
48
|
end
|
49
49
|
|
50
50
|
def self.details
|
51
|
-
|
51
|
+
'You can use this action to get the number of commits of this branch. This is useful if you want to set the build number to the number of commits. See `pantograph actions number_of_commits` for more details.'
|
52
52
|
end
|
53
53
|
|
54
54
|
def self.authors
|
55
|
-
[
|
55
|
+
['onevcat', 'samuelbeek']
|
56
56
|
end
|
57
57
|
|
58
58
|
def self.is_supported?(platform)
|
@@ -33,19 +33,19 @@ module Pantograph
|
|
33
33
|
def self.available_options
|
34
34
|
[
|
35
35
|
PantographCore::ConfigItem.new(key: :force,
|
36
|
-
env_name:
|
37
|
-
description:
|
36
|
+
env_name: 'PUSH_GIT_FORCE',
|
37
|
+
description: 'Force push to remote',
|
38
38
|
is_string: false,
|
39
39
|
default_value: false,
|
40
40
|
optional: true),
|
41
41
|
PantographCore::ConfigItem.new(key: :remote,
|
42
|
-
env_name:
|
43
|
-
description:
|
44
|
-
default_value:
|
42
|
+
env_name: 'GIT_PUSH_REMOTE',
|
43
|
+
description: 'The remote to push tags to',
|
44
|
+
default_value: 'origin',
|
45
45
|
optional: true),
|
46
46
|
PantographCore::ConfigItem.new(key: :tag,
|
47
|
-
env_name:
|
48
|
-
description:
|
47
|
+
env_name: 'GIT_PUSH_TAG',
|
48
|
+
description: 'The tag to push to remote',
|
49
49
|
optional: true)
|
50
50
|
]
|
51
51
|
end
|
@@ -41,61 +41,61 @@ module Pantograph
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def self.description
|
44
|
-
|
44
|
+
'Push local changes to the remote branch'
|
45
45
|
end
|
46
46
|
|
47
47
|
def self.available_options
|
48
48
|
[
|
49
49
|
PantographCore::ConfigItem.new(key: :local_branch,
|
50
|
-
env_name:
|
51
|
-
description:
|
50
|
+
env_name: 'GIT_PUSH_LOCAL_BRANCH',
|
51
|
+
description: 'The local branch to push from. Defaults to the current branch',
|
52
52
|
default_value_dynamic: true,
|
53
53
|
optional: true),
|
54
54
|
PantographCore::ConfigItem.new(key: :remote_branch,
|
55
|
-
env_name:
|
56
|
-
description:
|
55
|
+
env_name: 'GIT_PUSH_REMOTE_BRANCH',
|
56
|
+
description: 'The remote branch to push to. Defaults to the local branch',
|
57
57
|
default_value_dynamic: true,
|
58
58
|
optional: true),
|
59
59
|
PantographCore::ConfigItem.new(key: :force,
|
60
|
-
env_name:
|
61
|
-
description:
|
60
|
+
env_name: 'PUSH_GIT_FORCE',
|
61
|
+
description: 'Force push to remote',
|
62
62
|
type: Boolean,
|
63
63
|
default_value: false),
|
64
64
|
PantographCore::ConfigItem.new(key: :force_with_lease,
|
65
|
-
env_name:
|
66
|
-
description:
|
65
|
+
env_name: 'PUSH_GIT_FORCE_WITH_LEASE',
|
66
|
+
description: 'Force push with lease to remote',
|
67
67
|
type: Boolean,
|
68
68
|
default_value: false),
|
69
69
|
PantographCore::ConfigItem.new(key: :tags,
|
70
|
-
env_name:
|
71
|
-
description:
|
70
|
+
env_name: 'PUSH_GIT_TAGS',
|
71
|
+
description: 'Whether tags are pushed to remote',
|
72
72
|
type: Boolean,
|
73
73
|
default_value: true),
|
74
74
|
PantographCore::ConfigItem.new(key: :remote,
|
75
|
-
env_name:
|
76
|
-
description:
|
75
|
+
env_name: 'GIT_PUSH_REMOTE',
|
76
|
+
description: 'The remote to push to',
|
77
77
|
default_value: 'origin'),
|
78
78
|
PantographCore::ConfigItem.new(key: :no_verify,
|
79
|
-
env_name:
|
80
|
-
description:
|
79
|
+
env_name: 'GIT_PUSH_USE_NO_VERIFY',
|
80
|
+
description: 'Whether or not to use --no-verify',
|
81
81
|
type: Boolean,
|
82
82
|
default_value: false),
|
83
83
|
PantographCore::ConfigItem.new(key: :set_upstream,
|
84
|
-
env_name:
|
85
|
-
description:
|
84
|
+
env_name: 'GIT_PUSH_USE_SET_UPSTREAM',
|
85
|
+
description: 'Whether or not to use --set-upstream',
|
86
86
|
type: Boolean,
|
87
87
|
default_value: false)
|
88
88
|
]
|
89
89
|
end
|
90
90
|
|
91
91
|
def self.author
|
92
|
-
|
92
|
+
'lmirosevic'
|
93
93
|
end
|
94
94
|
|
95
95
|
def self.details
|
96
96
|
[
|
97
97
|
"Lets you push your local commits to a remote git repo. Useful if you make local changes such as adding a version bump commit (using `commit_version_bump`) or a git tag (using 'add_git_tag') on a CI server, and you want to push those changes back to your canonical/main repo.",
|
98
|
-
|
98
|
+
'If this is a new branch, use the `set_upstream` option to set the remote branch as upstream.'
|
99
99
|
].join("\n")
|
100
100
|
end
|
101
101
|
|
@@ -41,7 +41,7 @@ module Pantograph
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def self.description
|
44
|
-
|
44
|
+
'Resets git repo to a clean state by discarding uncommitted changes'
|
45
45
|
end
|
46
46
|
|
47
47
|
def self.details
|
@@ -78,31 +78,31 @@ module Pantograph
|
|
78
78
|
def self.available_options
|
79
79
|
[
|
80
80
|
PantographCore::ConfigItem.new(key: :files,
|
81
|
-
env_name:
|
82
|
-
description:
|
81
|
+
env_name: 'RESET_GIT_FILES',
|
82
|
+
description: 'Array of files the changes should be discarded. If not given, all files will be discarded',
|
83
83
|
optional: true,
|
84
84
|
is_string: false,
|
85
85
|
verify_block: proc do |value|
|
86
86
|
UI.user_error!("Please pass an array only") unless value.kind_of?(Array)
|
87
87
|
end),
|
88
88
|
PantographCore::ConfigItem.new(key: :force,
|
89
|
-
env_name:
|
90
|
-
description:
|
89
|
+
env_name: 'RESET_GIT_FORCE',
|
90
|
+
description: 'Skip verifying of previously clean state of repo. Only recommended in combination with `files` option',
|
91
91
|
is_string: false,
|
92
92
|
default_value: false),
|
93
93
|
PantographCore::ConfigItem.new(key: :skip_clean,
|
94
|
-
env_name:
|
94
|
+
env_name: 'RESET_GIT_SKIP_CLEAN',
|
95
95
|
description: "Skip 'git clean' to avoid removing untracked files like `.env`",
|
96
96
|
is_string: false,
|
97
97
|
default_value: false),
|
98
98
|
PantographCore::ConfigItem.new(key: :disregard_gitignore,
|
99
|
-
env_name:
|
100
|
-
description:
|
99
|
+
env_name: 'RESET_GIT_DISREGARD_GITIGNORE',
|
100
|
+
description: 'Setting this to true will clean the whole repository, ignoring anything in your local .gitignore. Set this to true if you want the equivalent of a fresh clone, and for all untracked and ignore files to also be removed',
|
101
101
|
is_string: false,
|
102
102
|
optional: true,
|
103
103
|
default_value: true),
|
104
104
|
PantographCore::ConfigItem.new(key: :exclude,
|
105
|
-
env_name:
|
105
|
+
env_name: 'RESET_GIT_EXCLUDE',
|
106
106
|
description: "You can pass a string, or array of, file pattern(s) here which you want to have survive the cleaning process, and remain on disk, e.g. to leave the `artifacts` directory you would specify `exclude: 'artifacts'`. Make sure this pattern is also in your gitignore! See the gitignore documentation for info on patterns",
|
107
107
|
is_string: false,
|
108
108
|
optional: true)
|