sambot 0.1.182 → 0.1.183

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
  SHA1:
3
- metadata.gz: 94aae9e6ddf2c5f9ce0bc76ef1ed8c92dc258f39
4
- data.tar.gz: 2e1a33dbb5ebbfe5925dbbd6080a85690bcec339
3
+ metadata.gz: ca69087e447dc0a85bdaae031310f343dcd3312d
4
+ data.tar.gz: 79762870407593affaa76306276a77c0c69c9534
5
5
  SHA512:
6
- metadata.gz: 2e50b30a736c1ef80acb2c3d622086009822acc263a9d1315d9819667446d1a393864776533bf864e743a51d5ba4ef45cda3ebcf0288caaab6a9f8751a5bda16
7
- data.tar.gz: 06bc1bccb1fcc9963d180edbebe39977762920d70fa0040ff16def8e51219d35d34e9a86aa1eeb226625d47ebcbac899575485c5d8f4984d91e0650bf4a484a1
6
+ metadata.gz: e1d32393bcf6a9ee217cce5026e4dffd73591a43ef78aee4b4775049f69450a5aeca4bdb88421b971702210094fa886b756abbcf074faef92b4912f0edf1bd1b
7
+ data.tar.gz: 7807e06b48c2dbe195289b1918d87ba18edfd465677bf7a61404b18ce9ae430bb14701da83ca2d365ac5800e09512bea91dafff4ce41c074bdf894e9f896cfaa
@@ -1,3 +1,7 @@
1
+ #################################################################################
2
+ # <SAMBOT> BUILD COMMAND #
3
+ #################################################################################
4
+
1
5
  This command will generate all the files required for the functioning of a Chef
2
6
  cookbook from aconfiguration file. The motivation behind this setup is to
3
7
  standardize and simplify the Chef cookbook creation workflow.
@@ -6,19 +10,10 @@ The configuration file should be called .config.yml and stored in the root of
6
10
  the Chef cookbook. After the command is run, all the files required to author
7
11
  a cookbook will be placed in the same directory as the .config.yml file.
8
12
 
9
- The .config.yml has the following structure:
10
-
11
- * name - the name of the cookbook
12
-
13
- * version - the version of the cookbook
14
-
15
- * platforms - the different platforms the cookbook can run on, centos and/or windows
16
-
17
- * description - a description for the cookbook
18
-
19
- * suites - the suites attribute that would go into the .kitchen.yml files and should follow exactly that structure
20
-
21
13
  Furthermore, a pre-push Git hook will be generated which will check the cookbook
22
14
  files before allowing the origin repository to be updated.
23
15
 
24
- The build command will fail if the file is not present or isn't properly formatted.
16
+ The build command will fail if the .config.yml file is not present or isn't
17
+ properly formatted. To understand the structure of a .config.yml file,
18
+ simply create a new cookbook or take a look at the comments in the
19
+ template file templates/.config.yml.
@@ -1 +1,3 @@
1
- Nothing yet - please add to this!
1
+ #################################################################################
2
+ # <SAMBOT> BUMP COMMAND #
3
+ #################################################################################
@@ -1,2 +1,6 @@
1
+ #################################################################################
2
+ # <SAMBOT> CLEAN COMMAND #
3
+ #################################################################################
4
+
1
5
  This command will remove all files generated by `sambot cookbook build`.
2
6
  This is required to ensure the generated files are not stored in source control.
@@ -0,0 +1,7 @@
1
+ #################################################################################
2
+ # <SAMBOT> VERSION COMMAND #
3
+ #################################################################################
4
+
5
+ This command will output the version of the cookbook in the current directory.
6
+
7
+ It is mostly used for CI in order to give TeamCity builds their correct version number.
@@ -1,3 +1,3 @@
1
- This command will output the version of the cookbook in the current directory.
2
-
3
- It is mostly used for CI in order to give TeamCity builds their correct version number.
1
+ #################################################################################
2
+ # <SAMBOT> POPULATE COMMAND #
3
+ #################################################################################
@@ -1,23 +1,50 @@
1
- # The name of the role or wrapper cookbook. Should be of the form as-role-xxx if a role cookbook
2
- # and as-xxx if a wrapper cookbook.
1
+ #################################################################################
2
+ # COOKBOOK CONFIGURATION #
3
+ #################################################################################
4
+ ---
5
+ #################################################################################
6
+ # The name of the role or wrapper cookbook. Should be of the form #
7
+ # as-role-name if a role cookbook and as-name if a wrapper cookbook. #
8
+ #################################################################################
3
9
  name: <%= @config.name %>
4
- # The cookbook version. It will be added to the metadata.rb and needs to be incremented whenenver
5
- # a new cookbook version needs to be pushed to the Chef Server.
10
+ #################################################################################
11
+ # The cookbook version. It will be added to the metadata.rb and needs to be #
12
+ # incremented whenever a new cookbook version needs to be pushed to the Chef #
13
+ # Server. #
14
+ #################################################################################
6
15
  version: 0.0.1
7
- # The different platforms on which this cookbook can run. This dictates the contents of the .kitchen files
8
- # and which files are generated for the cookbook. The values can be 'centos', 'windows' or both.
16
+ #################################################################################
17
+ # The different platforms on which this cookbook can run. This dictates the #
18
+ # contents of the .kitchen files and which files are generated for the #
19
+ # cookbook. The values can be 'centos', 'windows' or both. #
20
+ #################################################################################
9
21
  platforms:
10
22
  <% @config.available_platforms.each do |platform| %>
11
23
  - <%= platform %>
12
24
  <% end %>
13
- # An array of gems to be added to the metadata.rb file.
25
+ #################################################################################
26
+ # An array of gems to be added to the metadata.rb file. #
27
+ #################################################################################
14
28
  gems:
15
- # The identifier used when generating instance names. Not yet implemented but in future, if the
16
- # identifier is OCTPS for example, a typical instance name would be OCTPS03-W8.
29
+ #################################################################################
30
+ # The identifier used when generating instance names. Not yet implemented but #
31
+ # in future, if the identifier is OCTPS for example, a typical instance name #
32
+ # would be OCTPS03-W8. #
33
+ #################################################################################
17
34
  identifier: <%= @config.identifier %>
18
- # The description o fthe cookbook that will go into the metadata.rb.
35
+ #################################################################################
36
+ # The cookbooks on which this cookbook depends. #
37
+ #################################################################################
38
+ dependencies:
39
+ #################################################################################
40
+ # The description for the cookbook that will go into the metadata.rb. #
41
+ #################################################################################
19
42
  description: <%= @config.description %>
20
- # The test suites that will be added to the .kitchen files.
43
+ #################################################################################
44
+ # TEST-KITCHEN SUITES #
45
+ # The content underneath will be added as-is to the Test-Kitchen configuration #
46
+ # file i.e. .kitchen.yml. #
47
+ #################################################################################
21
48
  suites:
22
49
  - name: default
23
50
  # The runlist for a specific suite can either be the same across all environments i.e. cloud or local or can
@@ -42,3 +69,43 @@ suites:
42
69
  inspec_tests:
43
70
  - name: <%= @config.name %>-profile
44
71
  git: git@github.exacttarget.com:ads-chef-profiles/<%= @name %>-profile.git
72
+ #################################################################################
73
+ # LOCAL TESTING CONFIGURATION #
74
+ #################################################################################
75
+ local_testing:
76
+ ###############################################################################
77
+ # Provides a list of recipes which will be run before the normal run-list #
78
+ # when testing locally. These recipes are not run when testing in the DEV #
79
+ # environment or when deploying a real instance so should only be used for #
80
+ # setting things up locally.
81
+ ###############################################################################
82
+ recipes:
83
+ ###############################################################################
84
+ # Provides a a set of attributes which will be applied when running Chef  #
85
+ # locally. The following attributes are automatically added to the Chef run #
86
+ # when using Test-Kitchen file: #
87
+ # node['default']['cloud_platform'] = '$PLATFORM' #
88
+ # where $PLATFORM is either LOCAL, GCP or RACKSPACE, depending on the #
89
+ # environment where Test-Kitchen is running. #
90
+ ###############################################################################
91
+ attributes:
92
+ # some:
93
+ # attribute: value
94
+ ###############################################################################
95
+ # Provides secrets to be stored in the Docker Vault instance. Make sure the #
96
+ # paths you set below are congruent with any attribute overrides you've set #
97
+ # above. These secrets can be added to the Docker Vault instance by running #
98
+ # `sambot populate`. #
99
+ # To read a file and store it in Vault i.e. a SSH key, prefix the value #
100
+ # with 'file::' and place the file in the 'local_testing' folder of the #
101
+ # cookbook. #
102
+ ###############################################################################
103
+ secrets:
104
+ # - description: A random secret example
105
+ # path: dev/nightswatch/my/secret
106
+ # keys:
107
+ # - value: my-data
108
+ # - description: Another random secret example
109
+ # path: dev/nightswatch/my/file_secret
110
+ # keys:
111
+ # - value: file::privatekey.pem
@@ -36,3 +36,5 @@ Vagrantfile.erb
36
36
  *bootstrap.sh
37
37
  *bootstrap.ps1
38
38
  .DS_Store
39
+ .env
40
+ docker-compose.yml
@@ -7,5 +7,5 @@ Style/MutableConstant:
7
7
  Exclude:
8
8
  - recipes/linux_chefdk_setup.rb
9
9
 
10
- Layout/EmptyLinesAroundBlockBody:
10
+ Style/EmptyLinesAroundBlockBody:
11
11
  Enabled: false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sambot
4
- VERSION = '0.1.182'.freeze
4
+ VERSION = '0.1.183'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sambot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.182
4
+ version: 0.1.183
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Kouame
@@ -400,6 +400,7 @@ files:
400
400
  - lib/sambot/docs/bump.txt
401
401
  - lib/sambot/docs/clean.txt
402
402
  - lib/sambot/docs/create.txt
403
+ - lib/sambot/docs/populate.txt
403
404
  - lib/sambot/docs/version.txt
404
405
  - lib/sambot/fs.rb
405
406
  - lib/sambot/runtime.rb