dtk-client 0.7.10 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/README.md +83 -49
- data/bin/dtk +18 -1
- data/bin/dtk-execute +18 -1
- data/bin/dtk-shell +17 -0
- data/dtk-client.gemspec +1 -1
- data/lib/auxiliary.rb +18 -1
- data/lib/bundler_monkey_patch.rb +17 -0
- data/lib/client.rb +18 -3
- data/lib/command_helper.rb +18 -1
- data/lib/command_helpers/git_repo/merge.rb +18 -1
- data/lib/command_helpers/git_repo.rb +18 -3
- data/lib/command_helpers/jenkins_client/config_xml.rb +18 -1
- data/lib/command_helpers/jenkins_client.rb +18 -4
- data/lib/command_helpers/service_importer.rb +20 -5
- data/lib/command_helpers/service_link.rb +18 -3
- data/lib/command_helpers/test_module_creator.rb +18 -1
- data/lib/commands/common/thor/access_control.rb +18 -1
- data/lib/commands/common/thor/action_result_handler.rb +17 -0
- data/lib/commands/common/thor/assembly_template.rb +18 -1
- data/lib/commands/common/thor/assembly_workspace.rb +18 -1
- data/lib/commands/common/thor/base_command_helper.rb +18 -1
- data/lib/commands/common/thor/clone.rb +19 -2
- data/lib/commands/common/thor/common.rb +18 -1
- data/lib/commands/common/thor/common_base.rb +18 -1
- data/lib/commands/common/thor/create_target.rb +18 -1
- data/lib/commands/common/thor/edit.rb +18 -2
- data/lib/commands/common/thor/inventory_parser.rb +18 -1
- data/lib/commands/common/thor/list_diffs.rb +17 -0
- data/lib/commands/common/thor/module/import.rb +18 -1
- data/lib/commands/common/thor/module.rb +20 -2
- data/lib/commands/common/thor/node.rb +18 -1
- data/lib/commands/common/thor/poller.rb +17 -0
- data/lib/commands/common/thor/pull_clone_changes.rb +18 -2
- data/lib/commands/common/thor/pull_from_remote.rb +18 -1
- data/lib/commands/common/thor/puppet_forge.rb +18 -3
- data/lib/commands/common/thor/purge_clone.rb +18 -1
- data/lib/commands/common/thor/push_clone_changes.rb +18 -1
- data/lib/commands/common/thor/push_to_remote.rb +18 -1
- data/lib/commands/common/thor/remotes.rb +17 -0
- data/lib/commands/common/thor/reparse.rb +18 -1
- data/lib/commands/common/thor/set_required_attributes.rb +18 -1
- data/lib/commands/thor/account.rb +42 -67
- data/lib/commands/thor/assembly.rb +18 -1
- data/lib/commands/thor/attribute.rb +17 -0
- data/lib/commands/thor/component.rb +18 -1
- data/lib/commands/thor/component_module.rb +18 -2
- data/lib/commands/thor/component_template.rb +18 -1
- data/lib/commands/thor/dependency.rb +18 -2
- data/lib/commands/thor/developer.rb +18 -1
- data/lib/commands/thor/dtk.rb +18 -2
- data/lib/commands/thor/library.rb +18 -2
- data/lib/commands/thor/node.rb +18 -3
- data/lib/commands/thor/node_group.rb +18 -2
- data/lib/commands/thor/node_template.rb +18 -2
- data/lib/commands/thor/project.rb +18 -1
- data/lib/commands/thor/provider.rb +18 -1
- data/lib/commands/thor/remotes.rb +18 -1
- data/lib/commands/thor/service.rb +20 -3
- data/lib/commands/thor/service_module.rb +19 -10
- data/lib/commands/thor/state_change.rb +17 -2
- data/lib/commands/thor/target.rb +18 -1
- data/lib/commands/thor/task.rb +18 -2
- data/lib/commands/thor/test_module.rb +18 -1
- data/lib/commands/thor/utils.rb +18 -1
- data/lib/commands/thor/workspace.rb +25 -3
- data/lib/commands.rb +18 -1
- data/lib/config/configuration.rb +18 -1
- data/lib/config/disk_cacher.rb +17 -0
- data/lib/configurator.rb +18 -2
- data/lib/context_router.rb +18 -1
- data/lib/core.rb +18 -1
- data/lib/domain/git_adapter.rb +18 -1
- data/lib/domain/git_error_handler.rb +17 -0
- data/lib/domain/response/error_handler.rb +18 -2
- data/lib/domain/response.rb +18 -2
- data/lib/dtk-client/version.rb +18 -1
- data/lib/dtk_client.rb +17 -0
- data/lib/dtk_constants.rb +18 -1
- data/lib/dtk_error.rb +18 -1
- data/lib/dtk_logger.rb +18 -1
- data/lib/error.rb +18 -1
- data/lib/execute/cli_pure/cli_rerouter.rb +17 -0
- data/lib/execute/command/api_call/map.rb +18 -1
- data/lib/execute/command/api_call/service.rb +18 -1
- data/lib/execute/command/api_call/translation_term.rb +18 -2
- data/lib/execute/command/api_call.rb +18 -1
- data/lib/execute/command/rest_call.rb +18 -1
- data/lib/execute/command.rb +18 -1
- data/lib/execute/command_processor/rest_call.rb +18 -2
- data/lib/execute/command_processor.rb +18 -1
- data/lib/execute/error_usage.rb +17 -0
- data/lib/execute/execute_context/result_store.rb +18 -1
- data/lib/execute/execute_context.rb +18 -2
- data/lib/execute/script/add_tenant.rb +18 -1
- data/lib/execute/script.rb +18 -2
- data/lib/execute.rb +18 -2
- data/lib/parser/adapters/option_parser.rb +18 -1
- data/lib/parser/adapters/thor/common_option_defs.rb +18 -1
- data/lib/parser/adapters/thor.rb +18 -1
- data/lib/require_first.rb +18 -1
- data/lib/search_hash.rb +18 -1
- data/lib/shell/context.rb +22 -5
- data/lib/shell/context_aux.rb +17 -0
- data/lib/shell/domain/active_context.rb +17 -0
- data/lib/shell/domain/context_entity.rb +17 -0
- data/lib/shell/domain/context_params.rb +18 -1
- data/lib/shell/domain/override_tasks.rb +18 -1
- data/lib/shell/domain/shadow_entity.rb +18 -1
- data/lib/shell/header_shell.rb +17 -0
- data/lib/shell/help_monkey_patch.rb +17 -0
- data/lib/shell/interactive_wizard.rb +46 -29
- data/lib/shell/message_queue.rb +18 -1
- data/lib/shell/parse_monkey_patch.rb +17 -0
- data/lib/shell/status_monitor.rb +17 -0
- data/lib/shell.rb +18 -5
- data/lib/task_status/refresh_mode.rb +18 -1
- data/lib/task_status/snapshot_mode.rb +18 -1
- data/lib/task_status/stream_mode/element/format.rb +18 -3
- data/lib/task_status/stream_mode/element/hierarchical_task/result/action.rb +18 -1
- data/lib/task_status/stream_mode/element/hierarchical_task/result/components.rb +17 -0
- data/lib/task_status/stream_mode/element/hierarchical_task/result/node_level.rb +17 -0
- data/lib/task_status/stream_mode/element/hierarchical_task/result.rb +18 -1
- data/lib/task_status/stream_mode/element/hierarchical_task/steps/action.rb +18 -2
- data/lib/task_status/stream_mode/element/hierarchical_task/steps/components.rb +18 -1
- data/lib/task_status/stream_mode/element/hierarchical_task/steps/node_level.rb +18 -1
- data/lib/task_status/stream_mode/element/hierarchical_task/steps.rb +18 -1
- data/lib/task_status/stream_mode/element/hierarchical_task.rb +18 -1
- data/lib/task_status/stream_mode/element/no_results.rb +17 -1
- data/lib/task_status/stream_mode/element/render.rb +18 -1
- data/lib/task_status/stream_mode/element/stage/render.rb +18 -1
- data/lib/task_status/stream_mode/element/stage.rb +18 -1
- data/lib/task_status/stream_mode/element/task_end.rb +18 -2
- data/lib/task_status/stream_mode/element/task_start.rb +18 -2
- data/lib/task_status/stream_mode/element.rb +18 -2
- data/lib/task_status/stream_mode.rb +18 -1
- data/lib/task_status.rb +18 -1
- data/lib/util/common_util.rb +17 -0
- data/lib/util/console.rb +18 -1
- data/lib/util/dtk_puppet.rb +17 -0
- data/lib/util/module_util.rb +18 -1
- data/lib/util/os_util.rb +19 -1
- data/lib/util/permission_util.rb +18 -1
- data/lib/util/remote_dependency_util.rb +17 -0
- data/lib/util/ssh_util.rb +17 -0
- data/lib/view_processor/augmented_simple_list.rb +18 -1
- data/lib/view_processor/hash_pretty_print.rb +18 -1
- data/lib/view_processor/simple_list.rb +18 -1
- data/lib/view_processor/table_print.rb +18 -5
- data/lib/view_processor.rb +18 -1
- data/puppet/r8meta.puppet.yml +17 -0
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NzcwNjY1YmQxNTFhNWNjMzM1Y2E5NDQ3ZTgxMDI2YjUwOWI5ZTI2Yw==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8bab62a8bff9a56a5888fb17f4128a69891786d0
|
4
|
+
data.tar.gz: 1ead8b18d171036edbf6f0633f4da99355b00f07
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
ZWQ1YjRhY2YzNzNhYTQ0MGM4OWZhNmIzZThhYTM0ODY4Njk4ZTBlZWY1MWIy
|
11
|
-
NjcyYzZlMjYxM2JlNzE2ZjQ2MjM3ZDNiZDg2ZTVjZmQzYTg1ODE=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NmIwOTNkODgyMTllNmE0ODRkY2IyNmRhZDIyYTc0NDFiYmE1YzE5Nzc4YTY0
|
14
|
-
ZTY2ZGNkOWNmMGE3MmY5OGEwZTBlZWMzNzE0NTIxYjljYTAyM2U1N2QwYWI2
|
15
|
-
MzA4ZTFlMGI1MTRmYTQ0MzI1MGUwMTA3YTIwMWYwYzhjMzYwOTY=
|
6
|
+
metadata.gz: 11804a4fc9c39c49616b048eaa7a8229b7f0e7a0abeae8a49e9cbaab2bec8e618befe267533ba671473f1c38116381e31a3a00056a2e67945be41034bf0bb456
|
7
|
+
data.tar.gz: 796071c75b5dce8c4377d849f8a955ae2ca5b8a4c67958f604c52edafe4201b9b3f3257f01a53aa68c3e256aba425f0eff86cb845cc64f35e2321ab3e62f2542
|
data/README.md
CHANGED
@@ -1,78 +1,112 @@
|
|
1
|
-
DTK Client
|
1
|
+
DTK Client
|
2
2
|
==============================
|
3
3
|
|
4
|
-
To install DTK Client, follow these steps
|
5
4
|
|
6
|
-
|
7
|
-
- Git is required for all features to work ([install instructions](http://git-scm.com/book/en/Getting-Started-Installing-Git))
|
8
|
-
- Install the dtk-client gem:
|
9
|
-
`gem install dtk-client`
|
5
|
+
#### Description
|
10
6
|
|
11
|
-
- Type <tt>dtk</tt> or <tt>dtk-shell</tt> to start using the client
|
12
|
-
On the first run, Client will present you with a wizard to enter your server and authentication info.
|
13
7
|
|
14
|
-
|
15
|
-
|
8
|
+
DTK Client is a Ruby based CLI interface for communication with the DTK Server.
|
9
|
+
It's main purpose is to provide an easy to use interface for importing modules, browsing modules repository and deploying assemblies and topologies.
|
16
10
|
|
17
|
-
|
18
|
-
|
11
|
+
---
|
12
|
+
#### Sytstem requirements
|
19
13
|
|
20
|
-
-
|
14
|
+
- Ruby 1.9.3
|
15
|
+
- Unix OS
|
21
16
|
|
22
|
-
|
23
|
-
|
17
|
+
---
|
18
|
+
#### Installation
|
24
19
|
|
25
|
-
|
20
|
+
For DTK Client to work, following steps have to be done:
|
26
21
|
|
27
|
-
|
28
|
-
|
29
|
-
```
|
22
|
+
- Git User set up
|
23
|
+
- RSA Keys Generated
|
30
24
|
|
31
|
-
|
25
|
+
To install DTK Client gem, execute:
|
26
|
+
|
27
|
+
`gem install dtk-client`
|
32
28
|
|
33
|
-
|
34
|
-
|
29
|
+
---
|
30
|
+
#### Initial setup
|
35
31
|
|
36
|
-
|
37
|
-
- If you don't have it install bundler gem <tt>gem install bundler</tt>
|
38
|
-
- Run bundle from dtk-client folder <tt>bundle install</tt>
|
32
|
+
There are two ways for DTK Client to run
|
39
33
|
|
40
|
-
|
41
|
-
|
34
|
+
- via an interactive shell (<tt>dtk-shell</tt>)
|
35
|
+
- by executing DTK Client commands (ie. <tt>dtk service list</tt>)
|
42
36
|
|
43
|
-
|
37
|
+
If it is the first time that the DTK Client is being used (by either of the ways), following prompts will appear:
|
44
38
|
|
45
39
|
```
|
46
|
-
|
47
|
-
|
40
|
+
Please enter the DTK server address (example: instance.dtk.io)
|
41
|
+
Server address:
|
48
42
|
|
49
|
-
|
50
|
-
|
43
|
+
Please enter your DTK login details
|
44
|
+
Username:
|
45
|
+
Password:
|
51
46
|
|
52
|
-
|
53
|
-
|
54
|
-
|
47
|
+
```
|
48
|
+
After entering the correct data, following message will appear:
|
49
|
+
|
50
|
+
`SSH key 'dtk-client' added successfully!`
|
51
|
+
|
52
|
+
This means that the DTK Server has successfully registered DTK Client and the client is ready for use.
|
55
53
|
|
56
|
-
|
54
|
+
---
|
55
|
+
#### DTK Client configuration
|
57
56
|
|
58
|
-
Configuration
|
59
|
-
----------------------
|
57
|
+
All of the DTK Configuration, installed component and service modules as well as client logs are located in `~/dtk`.
|
60
58
|
|
61
|
-
|
62
|
-
there you will define user credentials e.g.
|
59
|
+
DTK Client configuration options, such as development option, verbose calls to DTK Server, log options and Client user credentials, can be configured in `~/dtk/client.conf`:
|
63
60
|
|
64
61
|
```
|
65
|
-
|
66
|
-
|
67
|
-
|
62
|
+
debug_task_frequency=5 # assembly - frequency between requests (seconds)
|
63
|
+
auto_commit_changes=false # autocommit for modules
|
64
|
+
verbose_rest_calls=false # logging of REST calls
|
65
|
+
|
66
|
+
module_location=component_modules
|
67
|
+
service_location=service_modules
|
68
|
+
test_module_location=test_modules
|
69
|
+
backups_location=backups
|
70
|
+
|
71
|
+
|
72
|
+
server_port=80
|
73
|
+
secure_connection_server_port=443
|
68
74
|
secure_connection=true
|
75
|
+
server_host=instance.dtk.io
|
69
76
|
```
|
70
|
-
Run Tests
|
71
|
-
----------------------
|
72
77
|
|
73
|
-
- From dtk-client project root run <tt>rspec</tt>, this will run all unit tests
|
74
78
|
|
79
|
+
User credentials are located in `~/dtk/.connection`
|
80
|
+
|
81
|
+
Component and Service modules that are installed, or modules that are imported are located in `~/dtk/component_modules` and `~/dtk/service_modules/`
|
82
|
+
|
83
|
+
---
|
84
|
+
|
85
|
+
## Advanced features
|
86
|
+
#### DTK Repoman
|
87
|
+
|
88
|
+
DTK Repoman is a Git based repository for publishing and installing component modules and service modules. DTK Repoman has it's own users, known as catalog users. The inital setup should register the DTK Client to the Public Catalog users.
|
89
|
+
|
90
|
+
Successfully registered DTK Client on DTK Repoman enables execution of commands such as:
|
91
|
+
|
92
|
+
`dtk service-module list --remote` - lists service moduels on remote visible to the catalog user
|
93
|
+
|
94
|
+
`dtk component-module install namespace/component-module-name` - install component module
|
95
|
+
|
96
|
+
Switching from public user to a commercial user can be done with `dtk account set-catalog-credentials`. This will initate a prompt for catalog username and password
|
97
|
+
|
98
|
+
## License
|
99
|
+
|
100
|
+
dtk-client is copyright (C) 2010-2016 dtk contributors
|
101
|
+
|
102
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
103
|
+
you may not use this work except in compliance with the License.
|
104
|
+
You may obtain a copy of the License in the [LICENSE](LICENSE) file, or at:
|
105
|
+
|
106
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
75
107
|
|
76
|
-
|
77
|
-
|
78
|
-
|
108
|
+
Unless required by applicable law or agreed to in writing, software
|
109
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
110
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
111
|
+
See the License for the specific language governing permissions and
|
112
|
+
limitations under the License.
|
data/bin/dtk
CHANGED
@@ -1,4 +1,21 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Copyright (C) 2010-2016 dtk contributors
|
4
|
+
#
|
5
|
+
# This file is part of the dtk project.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
2
19
|
|
3
20
|
# GLOBAL IDENTIFIER
|
4
21
|
$shell_mode = false
|
@@ -72,4 +89,4 @@ rescue DTK::Client::DtkError => e
|
|
72
89
|
DtkLogger.instance.error(e.message, true)
|
73
90
|
rescue Exception => e
|
74
91
|
DtkLogger.instance.error_pp(e.message, e.backtrace)
|
75
|
-
end
|
92
|
+
end
|
data/bin/dtk-execute
CHANGED
@@ -1,4 +1,21 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Copyright (C) 2010-2016 dtk contributors
|
4
|
+
#
|
5
|
+
# This file is part of the dtk project.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
2
19
|
|
3
20
|
require File.expand_path('../lib/client', File.dirname(__FILE__))
|
4
21
|
require File.expand_path('../lib/execute', File.dirname(__FILE__))
|
@@ -12,4 +29,4 @@ Configurator.check_config_exists
|
|
12
29
|
conn = Session.get_connection()
|
13
30
|
exit if validate_connection(conn)
|
14
31
|
|
15
|
-
Execute::Script.execute()
|
32
|
+
Execute::Script.execute()
|
data/bin/dtk-shell
CHANGED
@@ -1,4 +1,21 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Copyright (C) 2010-2016 dtk contributors
|
4
|
+
#
|
5
|
+
# This file is part of the dtk project.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
2
19
|
require File.expand_path('../lib/shell', File.dirname(__FILE__))
|
3
20
|
require File.expand_path('../lib/commands/thor/account', File.dirname(__FILE__))
|
4
21
|
|
data/dtk-client.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |gem|
|
|
29
29
|
gem.add_dependency 'hirb','~> 0.7.0'
|
30
30
|
gem.add_dependency 'thor','~> 0.15.4'
|
31
31
|
gem.add_dependency 'erubis','~> 2.7.0'
|
32
|
-
gem.add_dependency 'dtk-common-core','0.
|
32
|
+
gem.add_dependency 'dtk-common-core','0.8.0'
|
33
33
|
gem.add_dependency 'git','1.2.9'
|
34
34
|
gem.add_dependency 'colorize','~> 0.5.8'
|
35
35
|
gem.add_dependency 'highline', '1.6.16'
|
data/lib/auxiliary.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK
|
2
19
|
module Client
|
3
20
|
module Auxiliary
|
@@ -41,4 +58,4 @@ module DTK
|
|
41
58
|
end
|
42
59
|
end
|
43
60
|
end
|
44
|
-
end
|
61
|
+
end
|
data/lib/bundler_monkey_patch.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module Bundler
|
2
19
|
module SharedHelpers
|
3
20
|
|
data/lib/client.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
require 'rubygems'
|
2
19
|
|
3
20
|
begin
|
@@ -38,6 +55,4 @@ begin
|
|
38
55
|
rescue SystemExit, Interrupt
|
39
56
|
#puts "DTK Client action canceled."
|
40
57
|
exit(1)
|
41
|
-
end
|
42
|
-
|
43
|
-
|
58
|
+
end
|
data/lib/command_helper.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK; module Client
|
2
19
|
module CommandHelperMixin
|
3
20
|
def Helper(helper_class_name)
|
@@ -13,4 +30,4 @@ module DTK; module Client
|
|
13
30
|
#TODO: make all commands helpers a subclass of this
|
14
31
|
class CommandHelper
|
15
32
|
end
|
16
|
-
end; end
|
33
|
+
end; end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK; module Client; class CommandHelper
|
2
19
|
class GitRepo
|
3
20
|
class Merge
|
@@ -133,4 +150,4 @@ module DTK; module Client; class CommandHelper
|
|
133
150
|
|
134
151
|
end
|
135
152
|
end
|
136
|
-
end; end; end
|
153
|
+
end; end; end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
# This code is predciated on assumption that they is only one local branch (with with documented exceptions)
|
2
19
|
# so checkout branch is not done in most cases
|
3
20
|
#TODO : make sure all functions that use local_repo_dir( inside pass in full_moudle_name, not just module_name
|
@@ -569,6 +586,4 @@ module DTK; module Client; class CommandHelper
|
|
569
586
|
repo.repo_dir.gsub(Regexp.new("/$"),"").split("/").last
|
570
587
|
end
|
571
588
|
end; end
|
572
|
-
end; end; end
|
573
|
-
|
574
|
-
|
589
|
+
end; end; end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
#TODO: should haev separet file sfor each template
|
2
19
|
require 'erubis'
|
3
20
|
class DTK::Client::JenkinsClient
|
@@ -268,4 +285,4 @@ end
|
|
268
285
|
eos
|
269
286
|
|
270
287
|
end
|
271
|
-
end
|
288
|
+
end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
# TODO: Marked for removal [Haris] - Do we need this?
|
2
19
|
require 'jenkins-client'
|
3
20
|
module DTK; module Client
|
@@ -86,7 +103,4 @@ module DTK; module Client
|
|
86
103
|
end
|
87
104
|
end
|
88
105
|
end
|
89
|
-
end; end
|
90
|
-
|
91
|
-
|
92
|
-
|
106
|
+
end; end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
dtk_require_from_base('configurator')
|
2
19
|
module DTK::Client
|
3
20
|
#
|
@@ -44,10 +61,8 @@ module DTK::Client
|
|
44
61
|
version = r_module['version']
|
45
62
|
full_name = (version && !version.eql?('master')) ? "#{module_name}(#{version})" : module_name
|
46
63
|
|
47
|
-
|
48
|
-
|
49
|
-
next
|
50
|
-
end
|
64
|
+
# No op for frozen modules
|
65
|
+
next if r_module['frozen']
|
51
66
|
|
52
67
|
print "Pulling #{module_type.gsub('_',' ')} content for '#{full_name}' ... " unless hide_output
|
53
68
|
|
@@ -229,4 +244,4 @@ module DTK::Client
|
|
229
244
|
end
|
230
245
|
|
231
246
|
end
|
232
|
-
end
|
247
|
+
end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK; module Client; class CommandHelper
|
2
19
|
class ServiceLink < self; class << self
|
3
20
|
def post_body_with_id_keys(context_params,method_argument_names)
|
@@ -13,6 +30,4 @@ module DTK; module Client; class CommandHelper
|
|
13
30
|
end
|
14
31
|
|
15
32
|
end; end
|
16
|
-
end; end; end
|
17
|
-
|
18
|
-
|
33
|
+
end; end; end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
require 'fileutils'
|
2
19
|
require 'erubis'
|
3
20
|
|
@@ -49,4 +66,4 @@ module DTK::Client
|
|
49
66
|
end
|
50
67
|
end
|
51
68
|
end
|
52
|
-
end
|
69
|
+
end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK::Client
|
2
19
|
module AccessControlMixin
|
3
20
|
|
@@ -43,7 +60,7 @@ module DTK::Client
|
|
43
60
|
end
|
44
61
|
|
45
62
|
puts "How should we resolve these dependencies: "
|
46
|
-
input = ::DTK::Shell::InteractiveWizard.
|
63
|
+
input = ::DTK::Shell::InteractiveWizard.text_input("(A)ll / (M)ain Module / (N)one ", true, /M|A|N/i)
|
47
64
|
if 'N'.eql?(input)
|
48
65
|
return nil
|
49
66
|
else
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK
|
2
19
|
module Client
|
3
20
|
module ActionResultHandler
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK::Client
|
2
19
|
module AssemblyTemplateMixin
|
3
20
|
def get_assembly_name(assembly_id)
|
@@ -72,4 +89,4 @@ module DTK::Client
|
|
72
89
|
end
|
73
90
|
end
|
74
91
|
end
|
75
|
-
end
|
92
|
+
end
|