MuranoCLI 3.2.1.pre.beta.6 → 3.2.1.pre.beta.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) hide show
  1. checksums.yaml +4 -4
  2. data/HISTORY.md +10 -0
  3. data/MuranoCLI.gemspec +37 -6
  4. data/Rakefile +38 -11
  5. data/lib/MrMurano/commands/business.rb +0 -4
  6. data/lib/MrMurano/version.rb +1 -1
  7. metadata +2 -251
  8. data/dockers/Dockerfile.2.2.9 +0 -40
  9. data/dockers/Dockerfile.2.3.6 +0 -40
  10. data/dockers/Dockerfile.2.4.3 +0 -40
  11. data/dockers/Dockerfile.2.5.0 +0 -40
  12. data/dockers/Dockerfile.GemRelease +0 -49
  13. data/dockers/Dockerfile.m4 +0 -122
  14. data/dockers/README.rst +0 -362
  15. data/dockers/RELEASE.rst +0 -135
  16. data/dockers/docker-test.sh +0 -163
  17. data/dockers/gem-release.sh +0 -4
  18. data/docs/basic_example.rst +0 -436
  19. data/docs/ci/.trustme.plugin +0 -140
  20. data/docs/ci/.trustme.sh +0 -516
  21. data/docs/ci/.trustme.vim +0 -55
  22. data/docs/completions/murano_completion-bash +0 -4484
  23. data/docs/demo.md +0 -109
  24. data/docs/develop.rst +0 -392
  25. data/docs/release.rst +0 -295
  26. data/spec/Account-Passwords_spec.rb +0 -245
  27. data/spec/Account_spec.rb +0 -256
  28. data/spec/Business_spec.rb +0 -307
  29. data/spec/ConfigFile_spec.rb +0 -55
  30. data/spec/ConfigMigrate_spec.rb +0 -108
  31. data/spec/Config_spec.rb +0 -440
  32. data/spec/Content_spec.rb +0 -422
  33. data/spec/GatewayBase_spec.rb +0 -65
  34. data/spec/GatewayDevice_spec.rb +0 -403
  35. data/spec/GatewayResource_spec.rb +0 -283
  36. data/spec/GatewaySettings_spec.rb +0 -130
  37. data/spec/HttpAuthed_spec.rb +0 -87
  38. data/spec/Http_spec.rb +0 -220
  39. data/spec/MakePretties_spec.rb +0 -127
  40. data/spec/Mock_spec.rb +0 -62
  41. data/spec/ProjectFile_spec.rb +0 -381
  42. data/spec/Setting_spec.rb +0 -120
  43. data/spec/Solution-ServiceConfig_spec.rb +0 -272
  44. data/spec/Solution-ServiceEventHandler_spec.rb +0 -442
  45. data/spec/Solution-ServiceModules_spec.rb +0 -562
  46. data/spec/Solution-UsersRoles_spec.rb +0 -269
  47. data/spec/Solution_spec.rb +0 -140
  48. data/spec/SyncRoot_spec.rb +0 -111
  49. data/spec/SyncUpDown_spec.rb +0 -868
  50. data/spec/Verbosing_spec.rb +0 -332
  51. data/spec/Webservice-Cors_spec.rb +0 -225
  52. data/spec/Webservice-Endpoint_spec.rb +0 -650
  53. data/spec/Webservice-File_spec.rb +0 -282
  54. data/spec/Webservice-Setting_spec.rb +0 -105
  55. data/spec/_workspace.rb +0 -43
  56. data/spec/cmd_business_spec.rb +0 -64
  57. data/spec/cmd_common.rb +0 -507
  58. data/spec/cmd_config_spec.rb +0 -73
  59. data/spec/cmd_content_spec.rb +0 -109
  60. data/spec/cmd_cors_spec.rb +0 -54
  61. data/spec/cmd_device_spec.rb +0 -130
  62. data/spec/cmd_domain_spec.rb +0 -62
  63. data/spec/cmd_element_spec.rb +0 -401
  64. data/spec/cmd_exchange_spec.rb +0 -114
  65. data/spec/cmd_help_spec.rb +0 -72
  66. data/spec/cmd_init_spec.rb +0 -475
  67. data/spec/cmd_keystore_spec.rb +0 -97
  68. data/spec/cmd_link_spec.rb +0 -105
  69. data/spec/cmd_logs_spec.rb +0 -162
  70. data/spec/cmd_password_spec.rb +0 -64
  71. data/spec/cmd_setting_application_spec.rb +0 -300
  72. data/spec/cmd_setting_product_spec.rb +0 -246
  73. data/spec/cmd_status_spec.rb +0 -300
  74. data/spec/cmd_syncdown_application_spec.rb +0 -128
  75. data/spec/cmd_syncdown_both_spec.rb +0 -178
  76. data/spec/cmd_syncdown_unit_spec.rb +0 -861
  77. data/spec/cmd_syncup_spec.rb +0 -148
  78. data/spec/cmd_token_spec.rb +0 -53
  79. data/spec/cmd_usage_spec.rb +0 -79
  80. data/spec/dry_run_formatter.rb +0 -28
  81. data/spec/fixtures/.mrmuranorc +0 -9
  82. data/spec/fixtures/ProjectFiles/invalid.yaml +0 -9
  83. data/spec/fixtures/ProjectFiles/only_meta.yaml +0 -24
  84. data/spec/fixtures/ProjectFiles/with_routes.yaml +0 -27
  85. data/spec/fixtures/SolutionFiles/0.2.0.json +0 -20
  86. data/spec/fixtures/SolutionFiles/0.2.0_invalid.json +0 -18
  87. data/spec/fixtures/SolutionFiles/0.2.json +0 -21
  88. data/spec/fixtures/SolutionFiles/0.3.0.json +0 -20
  89. data/spec/fixtures/SolutionFiles/0.3.0_invalid.json +0 -19
  90. data/spec/fixtures/SolutionFiles/0.3.json +0 -20
  91. data/spec/fixtures/SolutionFiles/basic.json +0 -20
  92. data/spec/fixtures/SolutionFiles/secret.json +0 -6
  93. data/spec/fixtures/configfile +0 -9
  94. data/spec/fixtures/dumped_config +0 -57
  95. data/spec/fixtures/exchange_element/element-show.json +0 -1
  96. data/spec/fixtures/exchange_element/swagger-mur-6407__10k.yaml +0 -282
  97. data/spec/fixtures/exchange_element/swagger-mur-6407__20k.yaml +0 -588
  98. data/spec/fixtures/gateway_resource_files/resources.notyaml +0 -12
  99. data/spec/fixtures/gateway_resource_files/resources.yaml +0 -13
  100. data/spec/fixtures/gateway_resource_files/resources_invalid.yaml +0 -13
  101. data/spec/fixtures/mrmuranorc_deleted_bob +0 -6
  102. data/spec/fixtures/mrmuranorc_tool_bob +0 -3
  103. data/spec/fixtures/product_spec_files/example.exoline.spec.yaml +0 -116
  104. data/spec/fixtures/product_spec_files/example.murano.spec.yaml +0 -14
  105. data/spec/fixtures/product_spec_files/gwe.exoline.spec.yaml +0 -21
  106. data/spec/fixtures/product_spec_files/gwe.murano.spec.yaml +0 -16
  107. data/spec/fixtures/product_spec_files/lightbulb-no-state.yaml +0 -11
  108. data/spec/fixtures/product_spec_files/lightbulb.yaml +0 -21
  109. data/spec/fixtures/roles-three.yaml +0 -11
  110. data/spec/fixtures/snapshots/murano application setting Writes (using Webservice.cors) a bool value 0.webmock +0 -98
  111. data/spec/fixtures/snapshots/murano application setting Writes (using Webservice.cors) a bool value 1.webmock +0 -98
  112. data/spec/fixtures/snapshots/murano application setting Writes (using Webservice.cors) a bool value No.webmock +0 -98
  113. data/spec/fixtures/snapshots/murano application setting Writes (using Webservice.cors) a bool value Yes.webmock +0 -98
  114. data/spec/fixtures/snapshots/murano application setting Writes (using Webservice.cors) a bool value bob.webmock +0 -72
  115. data/spec/fixtures/snapshots/murano application setting Writes (using Webservice.cors) a bool value false.webmock +0 -98
  116. data/spec/fixtures/snapshots/murano application setting Writes (using Webservice.cors) a bool value off.webmock +0 -98
  117. data/spec/fixtures/snapshots/murano application setting Writes (using Webservice.cors) a bool value on STDIN.webmock +0 -98
  118. data/spec/fixtures/snapshots/murano application setting Writes (using Webservice.cors) a bool value on.webmock +0 -98
  119. data/spec/fixtures/snapshots/murano application setting Writes (using Webservice.cors) a bool value true.webmock +0 -98
  120. data/spec/fixtures/snapshots/murano application setting Writes (using Webservice.cors) a json array blob with STDIN.webmock +0 -98
  121. data/spec/fixtures/snapshots/murano application setting Writes (using Webservice.cors) a json array blob.webmock +0 -98
  122. data/spec/fixtures/snapshots/murano application setting Writes (using Webservice.cors) an array.webmock +0 -98
  123. data/spec/fixtures/snapshots/murano application setting Writes (using Webservice.cors) appends an array.webmock +0 -98
  124. data/spec/fixtures/snapshots/murano application setting reads Webservice.cors to a file.webmock +0 -72
  125. data/spec/fixtures/snapshots/murano application setting reads Webservice.cors.webmock +0 -72
  126. data/spec/fixtures/snapshots/murano business list as json.webmock +0 -27
  127. data/spec/fixtures/snapshots/murano business list as table.webmock +0 -27
  128. data/spec/fixtures/snapshots/murano business list fewer fields.webmock +0 -27
  129. data/spec/fixtures/snapshots/murano business list only ids.webmock +0 -27
  130. data/spec/fixtures/snapshots/murano business list output to file.webmock +0 -27
  131. data/spec/fixtures/snapshots/murano business without project help.webmock +0 -9
  132. data/spec/fixtures/snapshots/murano config Needs a key.webmock +0 -9
  133. data/spec/fixtures/snapshots/murano config Reads a key.webmock +0 -9
  134. data/spec/fixtures/snapshots/murano config Removes a key.webmock +0 -9
  135. data/spec/fixtures/snapshots/murano config Sets a key.webmock +0 -9
  136. data/spec/fixtures/snapshots/murano config Sets a user key.webmock +0 -9
  137. data/spec/fixtures/snapshots/murano content life cycle.webmock +0 -144
  138. data/spec/fixtures/snapshots/murano cors sets CORS.webmock +0 -78
  139. data/spec/fixtures/snapshots/murano cors show CORS.webmock +0 -64
  140. data/spec/fixtures/snapshots/murano device activates.webmock +0 -86
  141. data/spec/fixtures/snapshots/murano device enables a batch.webmock +0 -76
  142. data/spec/fixtures/snapshots/murano device enables and lists.webmock +0 -78
  143. data/spec/fixtures/snapshots/murano device writes and reads.webmock +0 -136
  144. data/spec/fixtures/snapshots/murano domain show domain.webmock +0 -101
  145. data/spec/fixtures/snapshots/murano element edit unknown as unknown element.webmock +0 -43
  146. data/spec/fixtures/snapshots/murano element show --help.webmock +0 -9
  147. data/spec/fixtures/snapshots/murano element show as csv.webmock +0 -43
  148. data/spec/fixtures/snapshots/murano element show as default-table.webmock +0 -43
  149. data/spec/fixtures/snapshots/murano element show as json.webmock +0 -43
  150. data/spec/fixtures/snapshots/murano element show as table truncate.webmock +0 -43
  151. data/spec/fixtures/snapshots/murano element show as table wrap.webmock +0 -43
  152. data/spec/fixtures/snapshots/murano element show as yaml.webmock +0 -43
  153. data/spec/fixtures/snapshots/murano element show using ambiguous name.webmock +0 -43
  154. data/spec/fixtures/snapshots/murano element without project usage.webmock +0 -9
  155. data/spec/fixtures/snapshots/murano exchange with project list as json.webmock +0 -59
  156. data/spec/fixtures/snapshots/murano exchange with project list as table.webmock +0 -59
  157. data/spec/fixtures/snapshots/murano exchange with project list fewer fields.webmock +0 -59
  158. data/spec/fixtures/snapshots/murano exchange with project list only ids.webmock +0 -59
  159. data/spec/fixtures/snapshots/murano exchange with project list output to file.webmock +0 -59
  160. data/spec/fixtures/snapshots/murano exchange with project list purchase is already added ID.webmock +0 -83
  161. data/spec/fixtures/snapshots/murano exchange with project list purchase is ambiguous name.webmock +0 -59
  162. data/spec/fixtures/snapshots/murano exchange without project help.webmock +0 -9
  163. data/spec/fixtures/snapshots/murano help using commander as --help.webmock +0 -9
  164. data/spec/fixtures/snapshots/murano help using commander no args.webmock +0 -9
  165. data/spec/fixtures/snapshots/murano help using subshell no args.webmock +0 -9
  166. data/spec/fixtures/snapshots/murano help using subshell with --help.webmock +0 -9
  167. data/spec/fixtures/snapshots/murano init Won't init in HOME (gracefully).webmock +0 -9
  168. data/spec/fixtures/snapshots/murano init in empty directory with existing project.webmock +0 -201
  169. data/spec/fixtures/snapshots/murano init in empty directory without existing project.webmock +0 -193
  170. data/spec/fixtures/snapshots/murano init in existing project directory with ProjectFile.webmock +0 -213
  171. data/spec/fixtures/snapshots/murano init in existing project directory with SolutionFile 0.2.0.webmock +0 -213
  172. data/spec/fixtures/snapshots/murano init in existing project directory with SolutionFile 0.3.0.webmock +0 -213
  173. data/spec/fixtures/snapshots/murano init in existing project directory without ProjectFile.webmock +0 -213
  174. data/spec/fixtures/snapshots/murano keystore can call other commands.webmock +0 -108
  175. data/spec/fixtures/snapshots/murano keystore clearAll.webmock +0 -124
  176. data/spec/fixtures/snapshots/murano keystore deletes.webmock +0 -112
  177. data/spec/fixtures/snapshots/murano keystore gets.webmock +0 -96
  178. data/spec/fixtures/snapshots/murano keystore infos.webmock +0 -96
  179. data/spec/fixtures/snapshots/murano keystore lists.webmock +0 -96
  180. data/spec/fixtures/snapshots/murano link with project links and lists.webmock +0 -149
  181. data/spec/fixtures/snapshots/murano link with project unlinks.webmock +0 -165
  182. data/spec/fixtures/snapshots/murano link without project help.webmock +0 -9
  183. data/spec/fixtures/snapshots/murano link without project subshell vs inline using commander will not list.webmock +0 -27
  184. data/spec/fixtures/snapshots/murano link without project subshell vs inline using subshell will not list.webmock +0 -27
  185. data/spec/fixtures/snapshots/murano logs when project is setup tail log.webmock +0 -9
  186. data/spec/fixtures/snapshots/murano password Lists when no file.webmock +0 -9
  187. data/spec/fixtures/snapshots/murano password deletes a password.webmock +0 -9
  188. data/spec/fixtures/snapshots/murano password sets a password.webmock +0 -9
  189. data/spec/fixtures/snapshots/murano product setting Writes (using Device2.identity_format) a forced string value on STDIN.webmock +0 -90
  190. data/spec/fixtures/snapshots/murano product setting Writes (using Device2.identity_format) a forced string value.webmock +0 -90
  191. data/spec/fixtures/snapshots/murano product setting Writes (using Device2.identity_format) a number value fiftyHalf.webmock +0 -64
  192. data/spec/fixtures/snapshots/murano product setting Writes (using Device2.identity_format) a number value float 12.67.webmock +0 -90
  193. data/spec/fixtures/snapshots/murano product setting Writes (using Device2.identity_format) a number value integer 12.webmock +0 -90
  194. data/spec/fixtures/snapshots/murano product setting Writes (using Device2.identity_format) a number value on STDIN.webmock +0 -90
  195. data/spec/fixtures/snapshots/murano product setting Writes (using Device2.identity_format) a string value.webmock +0 -90
  196. data/spec/fixtures/snapshots/murano product setting Writes (using Device2.identity_format) merges into a dictionary.webmock +0 -90
  197. data/spec/fixtures/snapshots/murano single sync without ProjectFile syncdown.webmock +0 -322
  198. data/spec/fixtures/snapshots/murano status with ProjectFile status.webmock +0 -153
  199. data/spec/fixtures/snapshots/murano status with Solutionfile 0.2.0 status.webmock +0 -153
  200. data/spec/fixtures/snapshots/murano status with Solutionfile 0.3.0 status.webmock +0 -153
  201. data/spec/fixtures/snapshots/murano status without ProjectFile matches file path.webmock +0 -153
  202. data/spec/fixtures/snapshots/murano status without ProjectFile matches route.webmock +0 -153
  203. data/spec/fixtures/snapshots/murano status without ProjectFile status.webmock +0 -153
  204. data/spec/fixtures/snapshots/murano syncdown stubbed without ProjectFile syncdown.webmock +0 -151
  205. data/spec/fixtures/snapshots/murano syncdown without ProjectFile syncdown.webmock +0 -479
  206. data/spec/fixtures/snapshots/murano syncup without ProjectFile syncup.webmock +0 -357
  207. data/spec/fixtures/snapshots/murano token with project list as table.webmock +0 -9
  208. data/spec/fixtures/snapshots/murano token without project help.webmock +0 -9
  209. data/spec/fixtures/snapshots/murano usage show usage.webmock +0 -93
  210. data/spec/fixtures/syncable_conflict/services/devdata.lua +0 -18
  211. data/spec/fixtures/syncable_conflict/services/timers.lua +0 -4
  212. data/spec/fixtures/syncable_content/assets/icon.png +0 -0
  213. data/spec/fixtures/syncable_content/assets/index.html +0 -0
  214. data/spec/fixtures/syncable_content/assets/js/script.js +0 -0
  215. data/spec/fixtures/syncable_content/modules/table_util.lua +0 -58
  216. data/spec/fixtures/syncable_content/routes/manyRoutes.lua +0 -11
  217. data/spec/fixtures/syncable_content/routes/singleRoute.lua +0 -5
  218. data/spec/fixtures/websocket/README.rst +0 -110
  219. data/spec/fixtures/websocket/logs_blather.rb +0 -27
  220. data/spec/fixtures/websocket/logs_faker.rb +0 -153
  221. data/spec/fixtures/websocket/simple_connection.rb +0 -45
  222. data/spec/fixtures/websocket/simple_options.rb +0 -77
  223. data/spec/fixtures/websocket/simple_server.rb +0 -69
  224. data/spec/fixtures/websocket/wss-echo.rb +0 -48
  225. data/spec/fixtures/websocket/wss-fake-logs.rb +0 -20
  226. data/spec/spec_helper.rb +0 -131
  227. data/spec/variegated_TruthyFalsey_spec.rb +0 -29
  228. data/spec/webmock_snapshot.rb +0 -296
@@ -1,40 +0,0 @@
1
- FROM ruby:2.2.9-jessie
2
-
3
- USER root
4
-
5
- ENV LANGUAGE C.UTF-8
6
- ENV LANG C.UTF-8
7
- ENV LC_ALL C.UTF-8
8
-
9
- RUN useradd -m -s /bin/bash --uid 1001 -G root jenkins
10
-
11
- RUN \
12
- echo "deb http://ftp.us.debian.org/debian/ jessie main contrib non-free" \
13
- >> /etc/apt/sources.list \
14
- && echo "deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free" \
15
- >> /etc/apt/sources.list \
16
- && apt-get -qq update \
17
- && apt-get install -y sudo
18
-
19
- RUN echo "jenkins ALL= NOPASSWD: /bin/chmod" >> /etc/sudoers
20
-
21
- WORKDIR /app
22
- COPY . /app
23
-
24
- RUN /bin/chown -R jenkins /app
25
-
26
- USER jenkins
27
-
28
- RUN cd /app && \
29
- gem install bundler && \
30
- gem install rspec && \
31
- bundle install --with test && \
32
- rake build
33
-
34
- RUN gem install \
35
- pkg/MuranoCLI-$(ruby -e \
36
- 'require "/app/lib/MrMurano/version.rb"; puts MrMurano::VERSION' \
37
- ).gem
38
-
39
- # vim:tw=0:ts=4:sw=4:noet:ft=conf:
40
-
@@ -1,40 +0,0 @@
1
- FROM ruby:2.3.6-jessie
2
-
3
- USER root
4
-
5
- ENV LANGUAGE C.UTF-8
6
- ENV LANG C.UTF-8
7
- ENV LC_ALL C.UTF-8
8
-
9
- RUN useradd -m -s /bin/bash --uid 1001 -G root jenkins
10
-
11
- RUN \
12
- echo "deb http://ftp.us.debian.org/debian/ jessie main contrib non-free" \
13
- >> /etc/apt/sources.list \
14
- && echo "deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free" \
15
- >> /etc/apt/sources.list \
16
- && apt-get -qq update \
17
- && apt-get install -y sudo
18
-
19
- RUN echo "jenkins ALL= NOPASSWD: /bin/chmod" >> /etc/sudoers
20
-
21
- WORKDIR /app
22
- COPY . /app
23
-
24
- RUN /bin/chown -R jenkins /app
25
-
26
- USER jenkins
27
-
28
- RUN cd /app && \
29
- gem install bundler && \
30
- gem install rspec && \
31
- bundle install --with test && \
32
- rake build
33
-
34
- RUN gem install \
35
- pkg/MuranoCLI-$(ruby -e \
36
- 'require "/app/lib/MrMurano/version.rb"; puts MrMurano::VERSION' \
37
- ).gem
38
-
39
- # vim:tw=0:ts=4:sw=4:noet:ft=conf:
40
-
@@ -1,40 +0,0 @@
1
- FROM ruby:2.4.3-jessie
2
-
3
- USER root
4
-
5
- ENV LANGUAGE C.UTF-8
6
- ENV LANG C.UTF-8
7
- ENV LC_ALL C.UTF-8
8
-
9
- RUN useradd -m -s /bin/bash --uid 1001 -G root jenkins
10
-
11
- RUN \
12
- echo "deb http://ftp.us.debian.org/debian/ jessie main contrib non-free" \
13
- >> /etc/apt/sources.list \
14
- && echo "deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free" \
15
- >> /etc/apt/sources.list \
16
- && apt-get -qq update \
17
- && apt-get install -y sudo
18
-
19
- RUN echo "jenkins ALL= NOPASSWD: /bin/chmod" >> /etc/sudoers
20
-
21
- WORKDIR /app
22
- COPY . /app
23
-
24
- RUN /bin/chown -R jenkins /app
25
-
26
- USER jenkins
27
-
28
- RUN cd /app && \
29
- gem install bundler && \
30
- gem install rspec && \
31
- bundle install --with test && \
32
- rake build
33
-
34
- RUN gem install \
35
- pkg/MuranoCLI-$(ruby -e \
36
- 'require "/app/lib/MrMurano/version.rb"; puts MrMurano::VERSION' \
37
- ).gem
38
-
39
- # vim:tw=0:ts=4:sw=4:noet:ft=conf:
40
-
@@ -1,40 +0,0 @@
1
- FROM ruby:2.5.0-jessie
2
-
3
- USER root
4
-
5
- ENV LANGUAGE C.UTF-8
6
- ENV LANG C.UTF-8
7
- ENV LC_ALL C.UTF-8
8
-
9
- RUN useradd -m -s /bin/bash --uid 1001 -G root jenkins
10
-
11
- RUN \
12
- echo "deb http://ftp.us.debian.org/debian/ jessie main contrib non-free" \
13
- >> /etc/apt/sources.list \
14
- && echo "deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free" \
15
- >> /etc/apt/sources.list \
16
- && apt-get -qq update \
17
- && apt-get install -y sudo
18
-
19
- RUN echo "jenkins ALL= NOPASSWD: /bin/chmod" >> /etc/sudoers
20
-
21
- WORKDIR /app
22
- COPY . /app
23
-
24
- RUN /bin/chown -R jenkins /app
25
-
26
- USER jenkins
27
-
28
- RUN cd /app && \
29
- gem install bundler && \
30
- gem install rspec && \
31
- bundle install --with test && \
32
- rake build
33
-
34
- RUN gem install \
35
- pkg/MuranoCLI-$(ruby -e \
36
- 'require "/app/lib/MrMurano/version.rb"; puts MrMurano::VERSION' \
37
- ).gem
38
-
39
- # vim:tw=0:ts=4:sw=4:noet:ft=conf:
40
-
@@ -1,49 +0,0 @@
1
- FROM ruby:2.3.6-jessie
2
-
3
- USER root
4
-
5
- ENV LANGUAGE C.UTF-8
6
- ENV LANG C.UTF-8
7
- ENV LC_ALL C.UTF-8
8
-
9
- RUN useradd -m -s /bin/bash --uid 1001 -G root jenkins
10
-
11
- RUN \
12
- echo "deb http://ftp.us.debian.org/debian/ jessie main contrib non-free" \
13
- >> /etc/apt/sources.list \
14
- && echo "deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free" \
15
- >> /etc/apt/sources.list \
16
- && apt-get -qq update \
17
- && apt-get install -y sudo \
18
- && apt-get install -y curl \
19
- && apt-get install -y bzip2 \
20
- && apt-get install -y tar
21
-
22
- WORKDIR /app
23
- COPY . /app
24
-
25
- RUN /bin/chown -R jenkins /app
26
-
27
- USER jenkins
28
-
29
- RUN cd /app && \
30
- gem install bundler && \
31
- gem install rspec && \
32
- bundle install && \
33
- rake build
34
-
35
- RUN gem install \
36
- pkg/MuranoCLI-$(ruby -e \
37
- 'require "/app/lib/MrMurano/version.rb"; puts MrMurano::VERSION' \
38
- ).gem
39
-
40
- # Install github-release.
41
-
42
- RUN mkdir -p /home/jenkins/Downloads && \
43
- cd /home/jenkins/Downloads && \
44
- curl -L https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2 | bzcat | tar xf - && \
45
- mkdir -p /home/jenkins/bin && \
46
- cp bin/linux/amd64/github-release /home/jenkins/bin/github-release
47
-
48
- # vim:tw=0:ts=4:sw=4:noet:ft=conf:
49
-
@@ -1,122 +0,0 @@
1
- FROM ruby:RUBY_VERSION()-jessie
2
-
3
- dnl # NOTE: Environs from Jenkins, like ${WORKSPACE} or any passwords you
4
- dnl # inject, are not available from here (Build Environment setup).
5
- dnl #
6
- dnl # This is already a given, but just to be clear:
7
- USER root
8
-
9
- dnl # Jenkins defaults to the ASCII encoding, but we want UTF-8.
10
- dnl #
11
- dnl # FIXME/MEH: (lb): Murano CLI may still have encoding issues, e.g.,
12
- dnl # the highline.say() command crashes on some strings, complaining:
13
- dnl #
14
- dnl # invalid byte sequence in US-ASCII
15
- dnl #
16
- dnl # which we currently work around by running Murand CLI in ASCII, e.g.,
17
- dnl #
18
- dnl # murano --no-progress --no-color --ascii ...
19
- dnl #
20
- dnl # (lb): I tried to install en_US.UTF-8, e.g., using `locale-gen` and
21
- dnl # `update-locale`, but I couldn't make it work. The Docker container
22
- dnl # at least has C.UTF-8 encoding, which I think just has a different
23
- dnl # sort order than en_us.UTF-8.
24
- dnl #
25
- dnl # NOTE: If you try to change to en_US.UTF-8, which is not installed,
26
- dnl # you'll see: `setlocale: LC_ALL: cannot change locale (en_US.UTF-8)`.
27
- dnl #
28
- dnl # Set the locale, which changes the encoding for the `docker exec`
29
- dnl # command that Jenkins runs later.
30
- dnl #
31
- dnl # FIXME: (lb): Remove the --ascii switch (forced because if !tty?) and
32
- dnl # see if using C.UTF-8 makes the "invalid byte sequence" error go away.
33
- ENV LANGUAGE C.UTF-8
34
- ENV LANG C.UTF-8
35
- ENV LC_ALL C.UTF-8
36
-
37
- dnl # Some DEBUGGING tricks:
38
- dnl # RUN ls -la /app
39
- dnl # RUN ruby -v
40
- dnl # # Show: $GEM_HOME, $GEM_PATH, $GEM_ROOT, $BUNDLE_PATH, $BUNDLE_HOME, etc.
41
- dnl # RUN set | grep -e '^RUBY' -e '^GEM' -e '^BUNDLE'
42
- dnl # RUN gem env
43
- dnl # RUN ruby -rubygems -e 'puts Gem.dir'
44
- dnl # ...
45
- dnl # RUN command -v bundler
46
- dnl # RUN bundler -v
47
- dnl #
48
- dnl # In any case, gems are installed to:
49
- dnl # /usr/local/bundle/gems
50
- dnl #
51
- dnl # Jenkins runs the Execute Shell script on Docker as the 'jenkins' user,
52
- dnl # but Docker is confused unless we create that user now and assign it the
53
- dnl # UID that gets used. ((lb): This is hacky; Ops might fix this eventually.)
54
- dnl #
55
- dnl # Without adding the user to the root group and having them run as such,
56
- dnl # we'd see Errno::EACCES "Permission denied @ rb_sysopen" errors, and we'd
57
- dnl # have to do the hideous, grotesque act of granting permissions to all:
58
- dnl #
59
- dnl # RUN /bin/chmod -R go+w /app
60
- dnl # RUN /bin/chmod 2777 /app
61
- dnl #
62
- RUN useradd -m -s /bin/bash --uid 1001 -G root jenkins
63
-
64
- dnl # (lb): So. Weird. Sometimes the Jenkins Docker Volumes mount with 2755
65
- dnl # permissions. Othertimes with 2777. In case this happens again, I'll
66
- dnl # leaving this code here. Give jenkins user power to fix permissions on the
67
- dnl # mounted Volumes: /app/report and /app/coverage mount as 2755 root:root.
68
- dnl # 2018-01-18: This happened on the new Jenkins jobs. Maybe you only need
69
- dnl # to do this once per project, and then Jenkins remembers, even when
70
- dnl # the Docker container cache is invalid and the image is rebuilt?
71
- dnl # NOTE: Skipping `RUN apt-get upgrade -y` to run faster.
72
- RUN \
73
- echo "deb http://ftp.us.debian.org/debian/ jessie main contrib non-free" \
74
- >> /etc/apt/sources.list \
75
- && echo "deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free" \
76
- >> /etc/apt/sources.list \
77
- && apt-get -qq update \
78
- && apt-get install -y sudo
79
-
80
- dnl # (lb) It may be easier to give the jenkins user full sudo...
81
- RUN echo "jenkins ALL= NOPASSWD: /bin/chmod" >> /etc/sudoers
82
- dnl # RUN echo "jenkins ALL= NOPASSWD: /usr/local/bundle/bin/gem" >> /etc/sudoers
83
- dnl # RUN echo "jenkins ALL= NOPASSWD: ALL" >> /etc/sudoers
84
- dnl # If you have complainst about sudoers, try:
85
- dnl # RUN visudo -c
86
-
87
- dnl # Create the /app directory and give ownership to the new user, otherwise
88
- dnl # if we switch to the new user first, they cannot create the workdir.
89
- dnl #
90
- WORKDIR /app
91
- COPY . /app
92
-
93
- RUN /bin/chown -R jenkins /app
94
-
95
- dnl # Run as the new jenkins user, otherwise Ruby gem permissions are
96
- dnl # restrictive, and we don't want to have to fudge them, e.g.,
97
- dnl #
98
- dnl # # Madness!
99
- dnl # RUN chmod 2777 /usr/local/bundle
100
- dnl # RUN chmod 2777 /usr/local/bundle/bin
101
- dnl # RUN find /usr/local/bundle -type d -exec chmod 2777 {} +
102
- dnl # RUN find /usr/local/bundle -type f -exec chmod u+rw,g+rw,o+rw {} +
103
- dnl #
104
- dnl # Prepare the bundle and rspec Ruby commands, and build Murano CLI.
105
- dnl #
106
- USER jenkins
107
-
108
- RUN cd /app && \
109
- gem install bundler && \
110
- gem install rspec && \
111
- bundle install --with test && \
112
- rake build
113
-
114
- dnl # Install Murano CLI.
115
- dnl #
116
- RUN gem install \
117
- pkg/MuranoCLI-$(ruby -e \
118
- 'require "/app/lib/MrMurano/version.rb"; puts MrMurano::VERSION' \
119
- ).gem
120
-
121
- # vim:tw=0:ts=4:sw=4:noet:ft=conf:
122
-
data/dockers/README.rst DELETED
@@ -1,362 +0,0 @@
1
- ########################
2
- Murano CLI Jenkins Notes
3
- ########################
4
-
5
- ========================
6
- Creating the Dockerfiles
7
- ========================
8
-
9
- (lb): I tried installing RVM in a bare Ubuntu Docker container, but I ended
10
- up down a rabbit hole without any success. Fortunately, there are some ready-
11
- made Ruby images available, albeit just for the latest Rubies (i.e., not for
12
- Ruby 2.0 or Ruby 2.1). So we'll use these images, and we'll hopefully
13
- deprecate support for the older Rubies, and then we won't have to make
14
- RVM (or chruby) work.
15
-
16
- Generate Dockerfiles from the M4 template:
17
-
18
- .. code-block:: bash
19
-
20
- for ruby_vers in \
21
- "2.5.0" \
22
- "2.4.3" \
23
- "2.3.6" \
24
- "2.2.9" \
25
- ; do
26
- m4 \
27
- --define=RUBY_VERSION="${ruby_vers}" \
28
- dockers/Dockerfile.m4 \
29
- > dockers/Dockerfile.${ruby_vers}
30
- done
31
-
32
- ==============================
33
- Injected Environment Variables
34
- ==============================
35
-
36
- You'll see some environs injected into the config.
37
-
38
- Some of the environs are user-specific.
39
-
40
- 2018-01-19: Currently, the tests use Murano accounts created by Landon
41
- on https://www.exosite-staging.com/::
42
-
43
- MURANO_USERNAME => Email. Use different accounts for each Jenkins test job.
44
- E.g., landonbouma+staging-jenkins-ruby-2.2@exosite.com
45
- landonbouma+staging-jenkins-ruby-2.3@exosite.com
46
- etc.
47
-
48
- MURANO_PASSWORD => Obvious.
49
-
50
- MURANO_BUSINESS => For each new Murano account, create a business. This is its ID.
51
-
52
- ===============================================
53
- Jenkins project configuration: Murano CLI Tests
54
- ===============================================
55
-
56
- - Jenkins project:
57
-
58
- - NEW:
59
-
60
- https://jenkins.exosite.com/job/MuranoCLI/job/Murano%20CLI%20Tests%20-%20Ruby%202.3/configure
61
-
62
- - OLD:
63
-
64
- https://build.exosite.com/view/MuranoCLI/job/MrMurano%20Tests/configure
65
-
66
- - General configuration
67
-
68
- - Project name: ``Murano_CLI_Tests__Ruby_2_3``
69
-
70
- - Discard old builds ``✓``
71
-
72
- - Strategy: ``Log Rotation``
73
-
74
- - Days to keep builds: ``60``
75
-
76
- - Max # builds to keep: ``5``
77
-
78
- - GitHub project ``✓``
79
-
80
- - Project url: https://github.com/exosite/MuranoCLI/
81
-
82
- - Source Code Management
83
-
84
- - Git ``✓``
85
-
86
- - Repositories
87
-
88
- - Repository URL: https://github.com/exosite/MuranoCLI.git
89
-
90
- - Credentials: (SSH key. Set Deploy Key in GitHub; Credentials in Jenkins.)
91
-
92
- - Branches to build
93
-
94
- - Branch Specifier (blank for 'any') : ````
95
-
96
- - Build Triggers
97
-
98
- - GitHub hook trigger for GITScm polling ``✓``
99
-
100
- - Build Environment
101
-
102
- - Build inside a Docker container ``✓``
103
-
104
- - Docker image to use
105
-
106
- - Build from Dockerfile ``✓``
107
-
108
- - path to docker context: ``.``
109
-
110
- - Dockerfile: ``./dockers/Dockerfile.${RUBY_VERS}``
111
-
112
- - [Click Advanced]
113
-
114
- - Volumes
115
-
116
- - Add
117
-
118
- - Path on host: ``$WORKSPACE/report``
119
-
120
- - Path inside container: ``/app/report``
121
-
122
- - Add
123
-
124
- - Path on host: ``$WORKSPACE/coverage``
125
-
126
- - Path inside container: ``/app/coverage``
127
-
128
- - User group: ``root``
129
-
130
- - Container start command: ``/bin/cat``
131
-
132
- - Network bridge: ``bridge``
133
-
134
- - Inject environment variables to the build process ``✓``
135
-
136
- - Properties Content::
137
-
138
- MURANO_BUSINESS=<Business ID from www.exosite-staging.com>
139
-
140
- - Inject passwords to the build as environment variables ``✓``
141
-
142
- - Job passwords
143
-
144
- - Add
145
-
146
- - Name: ``MURANO_PASSWORD``
147
-
148
- - Password: ``****************``
149
-
150
- - Add
151
-
152
- - Name: ``MURANO_USERNAME``
153
-
154
- - Password: ``****************``
155
-
156
- - Build
157
-
158
- - Execute shell
159
-
160
- - Command::
161
-
162
- #!/bin/bash
163
- /app/dockers/docker-test.sh
164
-
165
- - Post-build Actions
166
-
167
- - Publish HTML reports
168
-
169
- - Reports
170
-
171
- - Add
172
-
173
- - HTML directory to archive: ``report``
174
-
175
- - Index page[s]: ``index-2_2_7.html,index-2_3_4.html,index-2_4_1.html``
176
-
177
- - Report title: ``RSpec Report``
178
-
179
- - Add
180
-
181
- - HTML directory to archive: ``coverage``
182
-
183
- - Index page[s]: ``index.html``
184
-
185
- - Report title: ``Coverage Report``
186
-
187
- - E-mail Notification
188
-
189
- - Recipients: ``landonbouma@exosite.com miketilstra@exosite.com``
190
-
191
- =====================================================
192
- Jenkins project configuration: Murano CLI Gem Release
193
- =====================================================
194
-
195
- - Jenkins project:
196
-
197
- - NEW:
198
-
199
- https://jenkins.exosite.com/job/MuranoCLI/job/Murano_CLI_Gem_Release/configure
200
-
201
- - OLD:
202
-
203
- https://build.exosite.com/view/MuranoCLI/job/MrMurano%20Gem%20Release/configure
204
-
205
- - General configuration
206
-
207
- - Project name: ``Murano_CLI_Gem_Release``
208
-
209
- - NOTE: Do not use spaces in the project name -- e.g., this is bad:
210
- ``Murano CLI Gem Release`` -- or the `Jenkins Docker Plugin
211
- <https://github.com/jenkinsci/docker-custom-build-environment-plugin>`__
212
- will complain, e.g., ``docker: Error response from daemon: Invalid container
213
- name (Murano CLI Gem Release-69), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed``.
214
-
215
- - Discard old builds ``✓``
216
-
217
- - Strategy: ``Log Rotation``
218
-
219
- - Days to keep builds: ``60``
220
-
221
- - Max # builds to keep: ``5``
222
-
223
- - GitHub project ``✓``
224
-
225
- - Project url: https://github.com/exosite/MuranoCLI/
226
-
227
- - Source Code Management
228
-
229
- - Git ``✓``
230
-
231
- - Repositories
232
-
233
- - Repository URL: https://github.com/exosite/MuranoCLI.git
234
-
235
- - Credentials [dropdown]: ``git``
236
-
237
- - Branches to build
238
-
239
- - Branch Specifier (blank for 'any') : ``*/tags/*``
240
-
241
- - Build Triggers
242
-
243
- - Poll SCM ``✓``
244
-
245
- - Schedule::
246
-
247
- H/5 * * * *
248
-
249
- - Build Environment
250
-
251
- - Use secret text(s) or file(s) ``✓``
252
-
253
- - Bindings
254
-
255
- - Secret text
256
-
257
- - Variable: ``GITHUB_TOKEN``
258
-
259
- - Credentials: "Specific credentials"
260
-
261
- Dropdown: "Exosite Github API Token"
262
-
263
- - Build inside a Docker container ``✓``
264
-
265
- - Docker image to use
266
-
267
- - Build from Dockerfile ``✓``
268
-
269
- - path to docker context: ``.``
270
-
271
- - Dockerfile: ``./dockers/Dockerfile.GemRelease``
272
-
273
- - Color ANSI Console Output ``✓``
274
-
275
- - ANSI color map [dropdown]: ``xterm``
276
-
277
- - Build
278
-
279
- - Execute shell
280
-
281
- - Command::
282
-
283
- #!/bin/bash
284
- export GITHUB_REPO=MuranoCLI
285
- export GITHUB_USER=exosite
286
- export PATH=$HOME/bin:$PATH
287
- /app/dockers/gem-release.sh
288
-
289
- - Post-build Actions
290
-
291
- - Files to archive: ``pkg/MuranoCLI-*.gem``
292
-
293
- - E-mail Notification
294
-
295
- - Recipients: ``user`@exosite.com user2@exosite.com``
296
-
297
- - Send e-mail for every unstable build ``✓``
298
-
299
- - HipChat Notifications
300
-
301
- - Credentials [dropdown]: ``HipChat token for Jenkins``
302
-
303
- - Project Room: ``4403216`` [MurCLI:CI]
304
-
305
- - Notifications
306
-
307
- - Notification Type: ``Build started``
308
- Color: ``purple``
309
-
310
- - Notification Type: ``Build aborted``
311
- Color: ``red``
312
-
313
- - Notification Type: ``Build successful``
314
- Color: ``green``
315
-
316
- - Notification Type: ``Build failed``
317
- Color: ``red``
318
-
319
- - Notification Type: ``Module not built``
320
- Color: ``red``
321
-
322
- - Notification Type: ``Build is back to normal``
323
- Color: ``yellow``
324
-
325
- - Notification Type: ``Build is unstable``
326
- Color: ``yellow``
327
-
328
- Job started::
329
-
330
- Jenkins is starting up <a href="$URL">$JOB_NAME #$BUILD_NUMBER</a> using <a href="$GIT_URL">$GIT_BRANCH</a> ($CHANGES_OR_CAUSE).
331
-
332
- Job Completed::
333
-
334
- Jenkins completed <a href="$URL">$JOB_NAME #$BUILD_NUMBER</a> on <a href="$GIT_URL">$GIT_BRANCH</a> (Lap Time: $DURATION).
335
-
336
- Legacy Jenkins Settings:
337
-
338
- - (lb): This is how it looked on the old build server, which is still
339
- alive if we need it:
340
-
341
- https://build.exosite.com/view/MuranoCLI/job/MrMurano%20Gem%20Release/
342
-
343
- - Build Environment
344
-
345
- - Inject environment variables to the build process ``✓``
346
-
347
- - Properties Content::
348
-
349
- GITHUB_REPO=MuranoCLI
350
- GITHUB_USER=exosite
351
- PATH=$HOME/bin:$PATH
352
-
353
- - Inject passwords to the build as environment variables ``✓``
354
-
355
- - Job passwords
356
-
357
- - Name: ``GITHUB_TOKEN``
358
-
359
- - Password: (App token generated on GitHub.)
360
-
361
- - Mask password parameters ``✓``
362
-