sonic-screwdriver 2.2.4 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/sonic/cli.rb +1 -0
- data/lib/sonic/execute.rb +6 -1
- data/lib/sonic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bbef13564fb67b71ae83ef8b80d9c67f3a7898bbdc5dd0215adb5309b478322
|
4
|
+
data.tar.gz: d27e4a05ccadc3bb45987fdfeaac328b6d620cef08fe4b5af89d7def964e9087
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fb10c05307747cb731e28d9e30b3cbacbc929b8a0f5f4ccdc303c0e2ceb1a6f0e7234f62d7336f0e21e80d197cd843314b41773478c8e9251a67bdbd23e0b1b
|
7
|
+
data.tar.gz: 725ec5a6aaa226b6e70b042db8551665976803ec74a6dfa13d10a114a616a93301d2df8aa5e074ce75c8886300e8539a19d1de864579b1b450c9bb5948af2006
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely* adheres to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [2.2.5] - 2021-04-24
|
7
|
+
- [#14](https://github.com/boltops-tools/sonic/pull/14) execute --timeout option: executionTimeout
|
8
|
+
|
6
9
|
## [2.2.4] - 2021-04-13
|
7
10
|
- [#13](https://github.com/boltops-tools/sonic/pull/13) execute --comment option
|
8
11
|
|
data/lib/sonic/cli.rb
CHANGED
@@ -30,6 +30,7 @@ module Sonic
|
|
30
30
|
option :instance_ids, desc: %Q|Instance ids to execute command on. Format: --instance-ids "i-111,i-222"|
|
31
31
|
option :tags, desc: %Q|Tags used to determine what instances to execute command on. Format: --tags "Key1=v1,v2;Key2=v3"|
|
32
32
|
option :comment, desc: "comment. defaults to the sonic command used"
|
33
|
+
option :timeout, aliases: %w[t], desc: "timeout in seconds. default to nil which uses AWS-RunShellScript default of 3600"
|
33
34
|
def execute(*command)
|
34
35
|
Execute.new(command, options).execute
|
35
36
|
end
|
data/lib/sonic/execute.rb
CHANGED
@@ -199,10 +199,15 @@ module Sonic
|
|
199
199
|
command = build_command(@command)
|
200
200
|
comment = @options[:comment] || "sonic #{ARGV.join(' ')}"
|
201
201
|
comment = comment[0..99] # comment has a max of 100 chars
|
202
|
+
|
203
|
+
parameters = { "commands" => command }
|
204
|
+
t = @options[:timeout]
|
205
|
+
parameters[:executionTimeout] = [t] if t # weird but executionTimeout expects an Array
|
206
|
+
|
202
207
|
options = criteria.merge(
|
203
208
|
document_name: "AWS-RunShellScript", # default
|
204
209
|
comment: comment,
|
205
|
-
parameters:
|
210
|
+
parameters: parameters,
|
206
211
|
# Default CloudWatchLog settings. Can be overwritten with settings.yml send_command
|
207
212
|
# IMPORTANT: make sure the EC2 instance the command runs on has access to write to CloudWatch Logs.
|
208
213
|
cloud_watch_output_config: {
|
data/lib/sonic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sonic-screwdriver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|