orchestration 0.4.14 → 0.4.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8603abb707884b67824a5f71c402bff863e53a812be3172cfeb4e9229d448d5
4
- data.tar.gz: 9b7cc45a5c9abec3fec6b6e09101dd8f04c9c1dbf54ce7e0b280942345fe5a6d
3
+ metadata.gz: fbfd1a39b0bcb3ea2c74b59a500d0978eae650317ee8845f9fa7221e8f076fbb
4
+ data.tar.gz: 92f8a91158821b0a4d32fdec00cbe2a11f2a75799ac7291a241aa223613b5c45
5
5
  SHA512:
6
- metadata.gz: d51f959f91e6d740fa6491037561364035ec489131003877f973a1ce3827c1baba24e96f533cbce9e146b5fd30b89e8b8d0b79aec81e543d26f0b27d7711f6c6
7
- data.tar.gz: a59cf9b833da91425f07c4cc798e2f0949a6fe01ff06f77fed9bfb5c1bce8f2c7f4b97f2b9f2d562d0cd5f262b43a3291cc66e7293d282bff6ffaa90f9a7b2e7
6
+ metadata.gz: bf663765ed79df877060ad431ac9b35d208633d93fce31b5ccdfe03e69662014a7e1b5e2fef4767834f10417f514a4e44d81886f3d6b7a4c0b31f430d461a8cf
7
+ data.tar.gz: 2a9f37acbfa2b3e0b5bb239042069ce8c3c4afa9d3d30b57376e5341d8af1c0bb7477078725907c466c8153d549fe54d20ee9c2f811403c81b46333029e98683
data/README.md CHANGED
@@ -35,7 +35,7 @@ The below screenshot demonstrates _Orchestration_ being installed in a brand new
35
35
  Add _Orchestration_ to your Gemfile:
36
36
 
37
37
  ```ruby
38
- gem 'orchestration', '~> 0.4.14'
38
+ gem 'orchestration', '~> 0.4.15'
39
39
  ```
40
40
 
41
41
  Install:
@@ -160,6 +160,11 @@ To load all variables from `.env` and launch a development server, run the follo
160
160
  make serve
161
161
  ```
162
162
 
163
+ To load a _Rails_ console:
164
+ ```bash
165
+ make console
166
+ ```
167
+
163
168
  The application environment will be output on launch for convenience.
164
169
 
165
170
  To pass extra commands to the _Rails_ server:
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task' unless ENV.key?('ORCHESTRATION_TOOLKIT_ONLY')
4
+ require 'rspec/core/rake_task'
5
5
 
6
6
  RSpec::Core::RakeTask.new(:spec) if defined?(RSpec)
7
7
 
@@ -6,8 +6,12 @@ SHELL:=/bin/bash
6
6
  ifdef env_file
7
7
  -include ${env_file}
8
8
  else
9
+ ifneq (${env},test)
10
+ ifeq (,$(findstring test,$(MAKECMDGOALS)))
9
11
  -include .env
10
12
  endif
13
+ endif
14
+ endif
11
15
 
12
16
  export
13
17
 
@@ -158,22 +162,28 @@ compose:
158
162
  .PHONY: serve
159
163
  serve: env_file ?= ./.env
160
164
  serve: rails = RAILS_ENV='${env}' bundle exec rails server ${server}
161
- serve: _verify_env
162
- @if [ "${custom_env_file}" == "1" ] && [ ! -f "${env_file}" ] ; \
163
- then \
164
- $(call println_error,'${red}Error${reset}: Environment file "${yellow}${env_file}${reset}" not found. ${cross}') ; \
165
- ${fail} ; \
166
- fi
165
+ serve:
166
+ @if [ -f "${env_file}" ] ; \
167
+ then ( \
168
+ $(call println,'${yellow}Environment${reset}: ${green}${env_file}${reset}') && \
169
+ cat '${env_file}' | ${format_env} && \
170
+ $(call println,'') \
171
+ ) ; \
172
+ fi
173
+ ${rails}
174
+
175
+ .PHONY: console
176
+ console: env_file ?= ./.env
177
+ console: rails = RAILS_ENV='${env}' bundle exec rails
178
+ console:
167
179
  @if [ -f "${env_file}" ] ; \
168
180
  then ( \
169
181
  $(call println,'${yellow}Environment${reset}: ${green}${env_file}${reset}') && \
170
182
  cat '${env_file}' | ${format_env} && \
171
- $(call println,'') && \
172
- set -a && . '${env_file}' && set +a && \
173
- ${rails} \
183
+ $(call println,'') \
174
184
  ) ; \
175
- else ${rails} ; \
176
- fi
185
+ fi
186
+ ${rails} console
177
187
 
178
188
  .PHONY: test-setup
179
189
  test-setup: env := test
@@ -248,7 +258,6 @@ ifndef manager
248
258
  endif
249
259
  @$(call println,'${yellow}Deploying stack via${reset} ${green}${manager}${reset} ...') && \
250
260
  ( \
251
- $(call make,_verify_compose env_file=${env_file} env=${env}) && \
252
261
  $(call make,bundle path='${path}/bundle.tar') ${log} && \
253
262
  cd '${path}' ${log} && \
254
263
  tar xf 'bundle.tar' ${log} && \
@@ -332,7 +341,12 @@ build:
332
341
  @git archive --format 'tar' -o '${context}' '${git_branch}' ${log} || ${fail}
333
342
  @temp=$$(mktemp -d) ; ( cd "$${temp}" && tar -uvf '${context}' . ) ${log} || ${fail}
334
343
  @$(call printrawln,'${green}complete.${reset} ${tick}')
344
+ ifdef sidecar
345
+ # Assume we are in a line-buffered environment (e.g. Jenkins)
346
+ @$(call println,'${yellow}Building image${reset} ...')
347
+ else
335
348
  @$(call print,'${yellow}Building image${reset} ...')
349
+ endif
336
350
  @docker build \
337
351
  --build-arg BUNDLE_GITHUB__COM \
338
352
  --build-arg BUNDLE_BITBUCKET__ORG \
@@ -352,26 +366,6 @@ push:
352
366
 
353
367
  ### Internal Commands ###
354
368
  #
355
- .PHONY: _verify_app_image
356
- _verify_app_image:
357
- @docker inspect '${docker_image}'
358
-
359
- .PHONY: _verify_compose
360
- _verify_compose: _verify_env
361
- @$(call print,'${yellow}Verifying compose file(s)${reset} ... ')
362
- @${replace_env}
363
- @${compose} config ${log} || ${fail}
364
- @${restore_env}
365
- @$(call printrawln,'${green}success${reset}. ${tick}')
366
-
367
- .PHONY: _verify_env
368
- _verify_env:
369
- @if [ "${custom_env_file}" == "1" ] && [ ! -f "${env_file}" ] ; \
370
- then \
371
- $(call print_error,'${red}Error${reset}: Environment file "${yellow}${env_file}${reset}" not found. ${cross}') ; \
372
- exit 1 ; \
373
- fi
374
-
375
369
  .PHONY: _clean-logs
376
370
  _clean-logs:
377
371
  @rm -f '${stdout}' '${stderr}'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orchestration
4
- VERSION = '0.4.14'
4
+ VERSION = '0.4.15'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orchestration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.14
4
+ version: 0.4.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Farrell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-06 00:00:00.000000000 Z
11
+ date: 2019-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: database_url