sonic-screwdriver 2.2.3 → 2.2.4

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: 2ac8a33e325657ad0ee4fab9c2d7a4a1d8c3fafbaf0017fed20446983869c39b
4
- data.tar.gz: 4b8bcf43b60ae33936f07b4d800173b2c1df27d091f1fac3e8f2f082501a8823
3
+ metadata.gz: 7012e35108a2515bf2ad5abe18cbe39502a4dc58e64732199334414cfb7b0808
4
+ data.tar.gz: 9cb1113b9bb23ce2605b01594d54d477e3f10f6322f0d97c8ebbd8a6fae5aa0b
5
5
  SHA512:
6
- metadata.gz: 97d9a1992af8d4e2dbede1ae0f8f965b773b94cde16bc06493fc99932cdbc3205c63ebef16c649e95e2f6f9d539775c45ed36db01897f7e33fcc80fe5509f9bb
7
- data.tar.gz: dd12a4015571ef144a3a793f9cae38c09ab4f55f8353aea07fbe8c5d598057167b5111988d1a12c595a3d044213bf126deca1fc5c8901fa21b23b3742c28cc94
6
+ metadata.gz: 99ccd14a805e3bb635bd41c65565d35a6afed559ecf0bd781b36ddc61bfd05e8c3dff926018b2605385647fb55c3eb0e1bc322bec609a56c0e274143c2bc5bb1
7
+ data.tar.gz: c27388fc985c3ac35e02189ccdd748b28fe3f3d1399aa36cc2f601b6fe5fa54cf9634f9984230d9067c3d8060c7c34a052782abf8e889a6695e1a9391b753e13
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.4] - 2021-04-13
7
+ - [#13](https://github.com/boltops-tools/sonic/pull/13) execute --comment option
8
+
6
9
  ## [2.2.3] - 2021-04-12
7
10
  - [#12](https://github.com/boltops-tools/sonic/pull/12) fix cli check
8
11
 
data/lib/sonic/cli.rb CHANGED
@@ -29,6 +29,7 @@ module Sonic
29
29
  # filter - Filter ec2 instances by tag name or instance_ids separated by commas
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
+ option :comment, desc: "comment. defaults to the sonic command used"
32
33
  def execute(*command)
33
34
  Execute.new(command, options).execute
34
35
  end
data/lib/sonic/execute.rb CHANGED
@@ -197,9 +197,11 @@ module Sonic
197
197
  def build_ssm_options
198
198
  criteria = transform_filter_option
199
199
  command = build_command(@command)
200
+ comment = @options[:comment] || "sonic #{ARGV.join(' ')}"
201
+ comment = comment[0..99] # comment has a max of 100 chars
200
202
  options = criteria.merge(
201
203
  document_name: "AWS-RunShellScript", # default
202
- comment: "sonic #{ARGV.join(' ')}"[0..99], # comment has a max of 100 chars
204
+ comment: comment,
203
205
  parameters: { "commands" => command },
204
206
  # Default CloudWatchLog settings. Can be overwritten with settings.yml send_command
205
207
  # IMPORTANT: make sure the EC2 instance the command runs on has access to write to CloudWatch Logs.
data/lib/sonic/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sonic
2
- VERSION = "2.2.3"
2
+ VERSION = "2.2.4"
3
3
  end
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.3
4
+ version: 2.2.4
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-12 00:00:00.000000000 Z
11
+ date: 2021-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport