lhj-tools 0.1.38 → 0.1.39

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4b7a07edf3348968838d40729cca25f41ba64ce15e201923d13d931590e7e97
4
- data.tar.gz: 5c5ec0c49a7653d41c07dab04c2838f8b10e94bb986eb645e2eeb3c664a61536
3
+ metadata.gz: c1016401e08b49467fcbd6362af988daaeec6d5f9272b58eaf19ddf0c10d002b
4
+ data.tar.gz: a4d51e70f9c75217efbb6f94cf84fdaa8a3cfce04ef3cee33c4c205b5895830b
5
5
  SHA512:
6
- metadata.gz: 672eee52600ff602c54aa7ae0a98e2dd418b33efac5b0ccbe3dc61ca47008a6af9eb7a124087437265b77663a5f0b92a87a4efef80d852fc38d93717afa66437
7
- data.tar.gz: eac0a1544282d3e4826419fb5e7e8648c067d3664717630d89da95632eae0a69f3eee1931e9cee65d218bc7a33ac0da7dbb53615b1f8adbe06d0dd491a275a08
6
+ metadata.gz: d7904a6b62c5a5a418a0ee5cc642ebd2dcea0b138aad1f19b2a2f352bee72011b15e3dff0022946cc762a578aefb0c6622001aa451e6a8267d963d8156980bde
7
+ data.tar.gz: 31a2943539fd9e629a89c3abb3b0e3fe65e5a61b683fdc485c356ed64ba45c895f4df87794aa2d4b29cb2c0f827629ae91a516aa4aa320c8c26faf83f07147fb
@@ -0,0 +1,37 @@
1
+
2
+ module Lhj
3
+ class Command
4
+ class JenkinsBuild < Command
5
+ self.summary = '执行jenkins的build任务'
6
+
7
+ self.arguments = [
8
+ CLAide::Argument.new('--server_url=http://www.jenkins.com', true),
9
+ CLAide::Argument.new('--job=job1', true)
10
+ ]
11
+
12
+ def self.options
13
+ [
14
+ %w[--server_url jenkins的地址],
15
+ %w[--job 运行的任务名]
16
+ ]
17
+ end
18
+
19
+ def validate!
20
+ super
21
+ help! '输入jenkins的地址' unless @server_url
22
+ help! '输入任务名' unless @job
23
+ end
24
+
25
+ def initialize(argv)
26
+ @server_url = argv.option('server_url')
27
+ @job = argv.option('job')
28
+ super
29
+ end
30
+
31
+ def handle
32
+ client = Lhj::JenkinsApi::Client.new(:server_url => @server_url)
33
+ client.job.build(@job)
34
+ end
35
+ end
36
+ end
37
+ end
data/lib/lhj/command.rb CHANGED
@@ -29,6 +29,7 @@ module Lhj
29
29
  require 'lhj/command/sync_pod_version'
30
30
  require 'lhj/command/pgyer_upload'
31
31
  require 'lhj/command/duplicate_imageset'
32
+ require 'lhj/command/jenkins_build'
32
33
 
33
34
  self.abstract_command = true
34
35
  self.command = 'lhj'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lhj
4
4
  module Tools
5
- VERSION = "0.1.38"
5
+ VERSION = "0.1.39"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhj-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.38
4
+ version: 0.1.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - lihaijian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-28 00:00:00.000000000 Z
11
+ date: 2022-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: claide
@@ -305,6 +305,7 @@ files:
305
305
  - lib/lhj/command/head_import.rb
306
306
  - lib/lhj/command/http.rb
307
307
  - lib/lhj/command/init.rb
308
+ - lib/lhj/command/jenkins_build.rb
308
309
  - lib/lhj/command/local/fetch.rb
309
310
  - lib/lhj/command/local/filter.rb
310
311
  - lib/lhj/command/local/local.rb