bigrig 0.4.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +24 -26
- data/bigrig.gemspec +2 -2
- data/lib/bigrig/models/container.rb +2 -2
- data/lib/bigrig/runner.rb +2 -10
- data/lib/bigrig/version.rb +1 -1
- data/lib/bigrig/waiter.rb +20 -0
- data/lib/bigrig.rb +1 -0
- data/spec/bigrig/actions/run_action_spec.rb +8 -0
- data/spec/bigrig/docker_adapter_spec.rb +1 -1
- data/spec/bigrig/models/container_spec.rb +0 -18
- data/spec/bigrig_spec.rb +20 -6
- data/spec/data/wait_for/Dockerfile +4 -0
- data/spec/data/wait_for/bigrig-wait.sh +5 -0
- data/spec/data/wait_for/bigrig.json +8 -0
- data/spec/data/wait_for_broken/Dockerfile +4 -0
- data/spec/data/wait_for_broken/bigrig-wait.sh +3 -0
- data/spec/data/wait_for_broken/bigrig.json +8 -0
- data/spec/vcr/Bigrig_DestroyAction/_perform/given_json_with_a_single_container/and_the_container_has_exited/should_remove_the_container.yml +65 -65
- data/spec/vcr/Bigrig_DestroyAction/_perform/given_json_with_a_single_container/and_the_container_is_running/kills_and_removes_the_container.yml +71 -71
- data/spec/vcr/Bigrig_DockerAdapter/_build/builds_the_given_directory.yml +11 -11
- data/spec/vcr/Bigrig_DockerAdapter/_build/passes_build_input_to_a_block.yml +5 -5
- data/spec/vcr/Bigrig_DockerAdapter/_container_exists_/when_the_container_does_not_exist/is_false.yml +20 -20
- data/spec/vcr/Bigrig_DockerAdapter/_container_exists_/when_the_container_exists/is_true.yml +13 -13
- data/spec/vcr/Bigrig_DockerAdapter/_image_id_by_tag/when_the_image_does_not_exist/raise_a_ImageNotFoundError.yml +20 -20
- data/spec/vcr/Bigrig_DockerAdapter/_image_id_by_tag/when_the_image_exists/returns_the_image_id.yml +19 -19
- data/spec/vcr/Bigrig_DockerAdapter/_kill/given_the_container_does_not_exist/should_raise_an_error.yml +20 -20
- data/spec/vcr/Bigrig_DockerAdapter/_kill/given_the_container_is_running/should_kill_the_container.yml +29 -29
- data/spec/vcr/Bigrig_DockerAdapter/_logs/streams_logs_to_a_block.yml +23 -23
- data/spec/vcr/Bigrig_DockerAdapter/_pull/given_a_block_to_capture_output/should_capture_output.yml +8 -8
- data/spec/vcr/Bigrig_DockerAdapter/_pull/given_the_repo_does_not_exist/raises_a_RepoNotFoundError.yml +3 -3
- data/spec/vcr/Bigrig_DockerAdapter/_pull/given_the_repo_exists/returns_the_image_id.yml +13 -13
- data/spec/vcr/Bigrig_DockerAdapter/_push/given_credentials/will_pass_login_and_password.yml +54 -54
- data/spec/vcr/Bigrig_DockerAdapter/_push/should_push_the_image.yml +1059 -553
- data/spec/vcr/Bigrig_DockerAdapter/_remove_container/when_the_container_does_not_exist/raises_a_ContainerNotFoundError.yml +40 -40
- data/spec/vcr/Bigrig_DockerAdapter/_remove_container/when_the_container_exists/should_remove_the_container.yml +44 -44
- data/spec/vcr/Bigrig_DockerAdapter/_remove_container/when_the_container_is_running/raises_a_ContainerRunningError.yml +13 -13
- data/spec/vcr/Bigrig_DockerAdapter/_remove_image/when_the_image_doesnt_exist/raises_an_error.yml +12 -12
- data/spec/vcr/Bigrig_DockerAdapter/_remove_image/when_the_image_exists/removes_the_image.yml +35 -35
- data/spec/vcr/Bigrig_DockerAdapter/_run/given_an_image_id_that_exists/and_a_name/starts_the_container_with_the_right_name.yml +35 -35
- data/spec/vcr/Bigrig_DockerAdapter/_run/given_an_image_id_that_exists/and_a_name_and_env_variables/starts_the_container_with_env_set.yml +35 -35
- data/spec/vcr/Bigrig_DockerAdapter/_run/given_an_image_id_that_exists/and_a_name_and_ports/starts_the_container_with_ports_exposed.yml +41 -41
- data/spec/vcr/Bigrig_DockerAdapter/_running_/when_the_container_does_not_exist/returns_false.yml +20 -20
- data/spec/vcr/Bigrig_DockerAdapter/_running_/when_the_container_is_not_running/returns_false.yml +13 -15
- data/spec/vcr/Bigrig_DockerAdapter/_running_/when_the_container_is_running/returns_true.yml +17 -17
- data/spec/vcr/Bigrig_DockerAdapter/_tag/should_tag_the_image.yml +34 -34
- data/spec/vcr/Bigrig_LogAction/_perform/follows_the_log.yml +43 -43
- data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_a_path/builds_the_image_before_starting_it.yml +222 -26
- data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_hosts_by_ip/should_pass_hosts_to_container.yml +180 -74
- data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_hosts_by_name/should_lookup_ips_for_hosts_with_a_hostname.yml +181 -75
- data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_links/should_pass_links_to_the_right_container.yml +351 -139
- data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_multiple_containers/launches_both_containers_in_parallel.yml +130 -130
- data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_multiple_containers/spins_up_multiple_containers.yml +140 -140
- data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_one_container/should_spin_up_a_single_container.yml +175 -69
- data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_one_container/when_a_dead_container_exists/should_remove_existing_containers.yml +159 -53
- data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_volumes/should_pass_volumes_to_the_right_container.yml +180 -74
- data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_volumes_from/should_pass_volumes_from_to_the_right_container.yml +351 -139
- data/spec/vcr/Bigrig_RunAction/_perform/given_a_file_with_volumes_from/starts_the_dependant_container_last.yml +130 -130
- data/spec/vcr/Bigrig_RunAction/_perform/when_activating_profiles_that_do_not_exist/ignores_the_missing_profile.yml +268 -77
- data/spec/vcr/Bigrig_RunAction/_perform/with_a_file_with_active_profiles/uses_the_overridden_image.yml +180 -74
- data/spec/vcr/bigrig/destroy/spec/data/single_json/kills_the_container.yml +28 -28
- data/spec/vcr/bigrig/dev/spec/data/dev_json/activates_the_dev_profile.yml +266 -158
- data/spec/vcr/bigrig/dev/spec/data/dev_json/destroys_containers_on_exit.yml +78 -158
- data/spec/vcr/bigrig/dev/spec/data/dev_json/starts_the_containers.yml +187 -191
- data/spec/vcr/bigrig/dev/spec/data/dev_json/tails_the_logs.yml +38 -118
- data/spec/vcr/bigrig/dev/spec/data/scan_json/leaves_unaffected_containers_alone_when_the_scanned_file_changes.yml +811 -345
- data/spec/vcr/bigrig/dev/spec/data/scan_json/restarts_dependant_containers_when_the_scanned_file_changes.yml +813 -375
- data/spec/vcr/bigrig/dev/spec/data/scan_json/restarts_the_container_when_the_scanned_file_changes.yml +855 -363
- data/spec/vcr/bigrig/logs/spec/data/log_json/tails_the_logs.yml +23 -23
- data/spec/vcr/bigrig/run/spec/data/profiles_json_-p_qa/leaves_existing_env_values_alone.yml +14 -14
- data/spec/vcr/bigrig/run/spec/data/profiles_json_-p_qa/overrides_the_env.yml +14 -14
- data/spec/vcr/bigrig/run/spec/data/profiles_json_-p_qa/overrides_the_tag.yml +17 -17
- data/spec/vcr/bigrig/run/spec/data/single_json/sends_the_name_of_the_container_to_stdout.yml +12 -12
- data/spec/vcr/bigrig/run/spec/data/single_json/starts_the_container.yml +17 -17
- data/spec/vcr/bigrig/run/spec/data/wait_for/bigrig_json/waits_for_wait_for.yml +180 -0
- data/spec/vcr/bigrig/run/spec/data/wait_for_broken_json/fails_with_an_error.yml +12 -12
- data/spec/vcr/bigrig/ship/spec/data/ship_json/with_a_version/-c/cleans_the_image_when_its_done.yml +28 -28
- data/spec/vcr/bigrig/ship/spec/data/ship_json/with_a_version/builds_and_pushes_the_image.yml +21 -21
- data/spec/vcr/bigrig_bin_bigrig_destroy_spec/data/single_json_kills_the_container.yml +28 -28
- data/spec/vcr/bigrig_bin_bigrig_dev_spec/data/dev_json_activates_the_dev_profile.yml +135 -486
- data/spec/vcr/bigrig_bin_bigrig_dev_spec/data/dev_json_starts_the_containers.yml +146 -472
- data/spec/vcr/bigrig_bin_bigrig_dev_spec/data/dev_json_tails_the_logs.yml +402 -192
- data/spec/vcr/bigrig_bin_bigrig_dev_spec/data/scan_json_leaves_unaffected_containers_alone_when_the_scanned_file_changes.yml +980 -396
- data/spec/vcr/bigrig_bin_bigrig_dev_spec/data/scan_json_restarts_dependant_containers_when_the_scanned_file_changes.yml +916 -388
- data/spec/vcr/bigrig_bin_bigrig_dev_spec/data/scan_json_restarts_the_container_when_the_scanned_file_changes.yml +919 -391
- data/spec/vcr/bigrig_bin_bigrig_logs_spec/data/log_json_tails_the_logs.yml +23 -23
- data/spec/vcr/bigrig_bin_bigrig_run_spec/data/profiles_json_-p_qa_leaves_existing_env_values_alone.yml +159 -53
- data/spec/vcr/bigrig_bin_bigrig_run_spec/data/profiles_json_-p_qa_overrides_the_env.yml +159 -53
- data/spec/vcr/bigrig_bin_bigrig_run_spec/data/profiles_json_-p_qa_overrides_the_tag.yml +286 -31
- data/spec/vcr/bigrig_bin_bigrig_run_spec/data/single_json_sends_the_name_of_the_container_to_stdout.yml +159 -53
- data/spec/vcr/bigrig_bin_bigrig_run_spec/data/single_json_starts_the_container.yml +159 -53
- data/spec/vcr/bigrig_bin_bigrig_run_spec/data/wait_for/bigrig_json_waits_for_wait_for.yml +522 -0
- data/spec/vcr/bigrig_bin_bigrig_run_spec/data/wait_for_broken_json_fails_with_an_error.yml +175 -80
- data/spec/vcr/bigrig_bin_bigrig_ship_spec/data/ship_json_with_a_version_-c_cleans_the_image_when_its_done.yml +1036 -526
- data/spec/vcr/bigrig_bin_bigrig_ship_spec/data/ship_json_with_a_version_builds_and_pushes_the_image.yml +1024 -514
- metadata +17 -12
- data/spec/data/wait_for.json +0 -9
- data/spec/data/wait_for_broken.json +0 -9
- data/spec/vcr/bigrig/run/spec/data/wait_for_json/waits_for_wait_for.yml +0 -180
- data/spec/vcr/bigrig_bin_bigrig_run_spec/data/wait_for_json_waits_for_wait_for.yml +0 -412
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: '{"Image":"hawknewton/show-env"}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Swipely/Docker-API 1.
|
11
|
+
- Swipely/Docker-API 1.21.4
|
12
12
|
Content-Type:
|
13
13
|
- application/json
|
14
14
|
response:
|
@@ -19,24 +19,24 @@ http_interactions:
|
|
19
19
|
Content-Type:
|
20
20
|
- application/json
|
21
21
|
Date:
|
22
|
-
-
|
22
|
+
- Fri, 05 Jun 2015 23:27:47 GMT
|
23
23
|
Content-Length:
|
24
24
|
- '90'
|
25
25
|
body:
|
26
26
|
encoding: UTF-8
|
27
27
|
string: |
|
28
|
-
{"Id":"
|
28
|
+
{"Id":"f9f8e6211ceb74495e7bfa804589c4e8ed42eafdc4ee4296120bc233160b9bfb","Warnings":null}
|
29
29
|
http_version:
|
30
|
-
recorded_at:
|
30
|
+
recorded_at: Fri, 05 Jun 2015 23:27:47 GMT
|
31
31
|
- request:
|
32
32
|
method: post
|
33
|
-
uri: "<DOCKER_HOST>/v1.16/containers/
|
33
|
+
uri: "<DOCKER_HOST>/v1.16/containers/f9f8e6211ceb74495e7bfa804589c4e8ed42eafdc4ee4296120bc233160b9bfb/start"
|
34
34
|
body:
|
35
35
|
encoding: UTF-8
|
36
36
|
string: "{}"
|
37
37
|
headers:
|
38
38
|
User-Agent:
|
39
|
-
- Swipely/Docker-API 1.
|
39
|
+
- Swipely/Docker-API 1.21.4
|
40
40
|
Content-Type:
|
41
41
|
- application/json
|
42
42
|
response:
|
@@ -45,12 +45,12 @@ http_interactions:
|
|
45
45
|
message:
|
46
46
|
headers:
|
47
47
|
Date:
|
48
|
-
-
|
48
|
+
- Fri, 05 Jun 2015 23:27:48 GMT
|
49
49
|
body:
|
50
50
|
encoding: UTF-8
|
51
51
|
string: ''
|
52
52
|
http_version:
|
53
|
-
recorded_at:
|
53
|
+
recorded_at: Fri, 05 Jun 2015 23:27:48 GMT
|
54
54
|
- request:
|
55
55
|
method: get
|
56
56
|
uri: "<DOCKER_HOST>/v1.16/containers/single-test/json"
|
@@ -59,7 +59,7 @@ http_interactions:
|
|
59
59
|
string: ''
|
60
60
|
headers:
|
61
61
|
User-Agent:
|
62
|
-
- Swipely/Docker-API 1.
|
62
|
+
- Swipely/Docker-API 1.21.4
|
63
63
|
Content-Type:
|
64
64
|
- text/plain
|
65
65
|
response:
|
@@ -70,15 +70,15 @@ http_interactions:
|
|
70
70
|
Content-Type:
|
71
71
|
- text/plain; charset=utf-8
|
72
72
|
Date:
|
73
|
-
-
|
73
|
+
- Fri, 05 Jun 2015 23:27:49 GMT
|
74
74
|
Content-Length:
|
75
|
-
- '
|
75
|
+
- '24'
|
76
76
|
body:
|
77
77
|
encoding: UTF-8
|
78
78
|
string: |
|
79
|
-
|
79
|
+
no such id: single-test
|
80
80
|
http_version:
|
81
|
-
recorded_at:
|
81
|
+
recorded_at: Fri, 05 Jun 2015 23:27:49 GMT
|
82
82
|
- request:
|
83
83
|
method: get
|
84
84
|
uri: "<DOCKER_HOST>/v1.16/containers/single-test/json"
|
@@ -87,7 +87,7 @@ http_interactions:
|
|
87
87
|
string: ''
|
88
88
|
headers:
|
89
89
|
User-Agent:
|
90
|
-
- Swipely/Docker-API 1.
|
90
|
+
- Swipely/Docker-API 1.21.4
|
91
91
|
Content-Type:
|
92
92
|
- text/plain
|
93
93
|
response:
|
@@ -98,15 +98,15 @@ http_interactions:
|
|
98
98
|
Content-Type:
|
99
99
|
- text/plain; charset=utf-8
|
100
100
|
Date:
|
101
|
-
-
|
101
|
+
- Fri, 05 Jun 2015 23:27:49 GMT
|
102
102
|
Content-Length:
|
103
|
-
- '
|
103
|
+
- '24'
|
104
104
|
body:
|
105
105
|
encoding: UTF-8
|
106
106
|
string: |
|
107
|
-
|
107
|
+
no such id: single-test
|
108
108
|
http_version:
|
109
|
-
recorded_at:
|
109
|
+
recorded_at: Fri, 05 Jun 2015 23:27:49 GMT
|
110
110
|
- request:
|
111
111
|
method: get
|
112
112
|
uri: "<DOCKER_HOST>/v1.16/containers/single-test/json"
|
@@ -115,7 +115,7 @@ http_interactions:
|
|
115
115
|
string: ''
|
116
116
|
headers:
|
117
117
|
User-Agent:
|
118
|
-
- Swipely/Docker-API 1.
|
118
|
+
- Swipely/Docker-API 1.21.4
|
119
119
|
Content-Type:
|
120
120
|
- text/plain
|
121
121
|
response:
|
@@ -126,15 +126,15 @@ http_interactions:
|
|
126
126
|
Content-Type:
|
127
127
|
- text/plain; charset=utf-8
|
128
128
|
Date:
|
129
|
-
-
|
129
|
+
- Fri, 05 Jun 2015 23:27:49 GMT
|
130
130
|
Content-Length:
|
131
|
-
- '
|
131
|
+
- '24'
|
132
132
|
body:
|
133
133
|
encoding: UTF-8
|
134
134
|
string: |
|
135
|
-
|
135
|
+
no such id: single-test
|
136
136
|
http_version:
|
137
|
-
recorded_at:
|
137
|
+
recorded_at: Fri, 05 Jun 2015 23:27:49 GMT
|
138
138
|
- request:
|
139
139
|
method: get
|
140
140
|
uri: "<DOCKER_HOST>/v1.16/containers/single-test/json"
|
@@ -143,7 +143,7 @@ http_interactions:
|
|
143
143
|
string: ''
|
144
144
|
headers:
|
145
145
|
User-Agent:
|
146
|
-
- Swipely/Docker-API 1.
|
146
|
+
- Swipely/Docker-API 1.21.4
|
147
147
|
Content-Type:
|
148
148
|
- text/plain
|
149
149
|
response:
|
@@ -154,13 +154,13 @@ http_interactions:
|
|
154
154
|
Content-Type:
|
155
155
|
- text/plain; charset=utf-8
|
156
156
|
Date:
|
157
|
-
-
|
157
|
+
- Fri, 05 Jun 2015 23:27:49 GMT
|
158
158
|
Content-Length:
|
159
|
-
- '
|
159
|
+
- '24'
|
160
160
|
body:
|
161
161
|
encoding: UTF-8
|
162
162
|
string: |
|
163
|
-
|
163
|
+
no such id: single-test
|
164
164
|
http_version:
|
165
|
-
recorded_at:
|
165
|
+
recorded_at: Fri, 05 Jun 2015 23:27:49 GMT
|
166
166
|
recorded_with: VCR 2.9.3
|