vagrant-openshift 3.0.7 → 3.0.8

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: b3fe170f2452ac6b16bb9b59aae8b97b545d4fc2
4
- data.tar.gz: 19294c1010b526c4b390e8a365066b115e0bd936
3
+ metadata.gz: 1f801d1a034a23c6ed705d62ff7b4117170cf03b
4
+ data.tar.gz: ef9e37029fd017195bdd6752946d064a7eb34a37
5
5
  SHA512:
6
- metadata.gz: 108a4d36deec143097fc7b8f5379f796f5ed70271809a0d9e94adea90694e5c22ed0d503da7312e812e2be695f8ca5d7a4d7a4162c09be0d736961c3358e4743
7
- data.tar.gz: fb31ad53478510a18bb165e3fa69f19df98fa1254086dd9f2d211ce1fb17114f068f7352e6395456b4ab80e9ceaab05d616ecce45d131a8be62daaa6ae168a82
6
+ metadata.gz: 3322ccb80bc697835fa435b6a2be8eaa7ef8eed49a8ef341d22a759a24aa13ab5e4473e041073e7f4a3c6b5a94b176e783aa9a433ade67d5ee4fbb66851c5d7f
7
+ data.tar.gz: ff6d96ec3325ef751c8209b09e73a50ef53590d6829628564b7641d10195609df8cc55114aeabbd198bc99854f1fc8a4315c1ab09c536b8fef9534bec76f3124
data/Gemfile CHANGED
@@ -7,6 +7,10 @@ group :development do
7
7
  # We depend on Vagrant for development, but we don't add it as a
8
8
  # gem dependency because we expect to be installed within the
9
9
  # Vagrant environment itself using `vagrant plugin`.
10
- gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git"
10
+ if File.exist?(File.expand_path("../../vagrant", __FILE__))
11
+ gem "vagrant", path: "../vagrant"
12
+ else
13
+ gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git"
14
+ end
11
15
  gem "json"
12
16
  end
data/README.asciidoc CHANGED
@@ -44,15 +44,6 @@ Compile using Rake:
44
44
  $ bundle exec rake
45
45
  ----
46
46
 
47
- NOTE: If at this point a warning like `git://github.com/mitchellh/vagrant.git (at master) is not yet checked out. Run bundle install first.` appears, run `bundle install` and then re-run `bundle exec rake`. The warning will most likely not go away, but it is safe to proceed regardless.
48
-
49
- Install the plugin using Vagrant (only necessary if `bundle exec rake` still failed with the above noted warning):
50
-
51
- [source,sh]
52
- ----
53
- $ vagrant plugin install pkg/vagrant-openshift-<release>.gem
54
- ----
55
-
56
47
  ===== From rubygems.org
57
48
 
58
49
  Install the published version of this plugin:
@@ -110,7 +110,6 @@ module Vagrant
110
110
  end
111
111
  b.use SyncLocalRepository
112
112
  b.use CheckoutRepositories
113
- b.use InstallOriginAssetDependencies, :restore_assets => true
114
113
  end
115
114
  if options[:build]
116
115
  b.use(BuildOriginBaseImages, options) if options[:images]
@@ -136,6 +135,23 @@ module Vagrant
136
135
  end
137
136
  end
138
137
  end
138
+
139
+ def self.repo_sync_origin_console(options)
140
+ Vagrant::Action::Builder.new.tap do |b|
141
+ b.use PrepareSshConfig
142
+ if options[:source]
143
+ if options[:clean]
144
+ b.use Clean, :repo => 'origin-console'
145
+ b.use CloneUpstreamRepositories, :repo => 'origin-console'
146
+ end
147
+ b.use SyncLocalRepository, :repo => 'origin-console'
148
+ b.use CheckoutRepositories, :repo => 'origin-console'
149
+ if options[:build]
150
+ b.use InstallOriginAssetDependencies, :restore_assets => true
151
+ end
152
+ end
153
+ end
154
+ end
139
155
 
140
156
  def self.repo_sync_origin_aggregated_logging(options)
141
157
  Vagrant::Action::Builder.new.tap do |b|
@@ -174,6 +190,18 @@ module Vagrant
174
190
  b.use TestExitCode
175
191
  end
176
192
  end
193
+
194
+ def self.run_origin_asset_tests(options)
195
+ Vagrant::Action::Builder.new.tap do |b|
196
+ # UI integration tests require the api server to be running
197
+ b.use RunSystemctl, {:action => "start", :service => "openshift"}
198
+ b.use RunOriginAssetTests, options
199
+ if options[:download]
200
+ b.use DownloadArtifactsOriginConsole
201
+ end
202
+ b.use TestExitCode
203
+ end
204
+ end
177
205
 
178
206
  def self.run_origin_aggregated_logging_tests(options)
179
207
  Vagrant::Action::Builder.new.tap do |b|
@@ -212,6 +240,12 @@ module Vagrant
212
240
  b.use DownloadArtifactsOriginAggregatedLogging
213
241
  end
214
242
  end
243
+
244
+ def self.download_origin_console_artifacts(options)
245
+ Vagrant::Action::Builder.new.tap do |b|
246
+ b.use DownloadArtifactsOriginConsole
247
+ end
248
+ end
215
249
 
216
250
  def self.gen_template(options)
217
251
  Vagrant::Action::Builder.new.tap do |b|
@@ -290,6 +324,7 @@ module Vagrant
290
324
  autoload :LocalOriginCheckout, action_root.join("local_origin_checkout")
291
325
  autoload :CreateBareRepoPlaceholders, action_root.join("create_bare_repo_placeholders")
292
326
  autoload :RunOriginTests, action_root.join("run_origin_tests")
327
+ autoload :RunOriginAssetTests, action_root.join("run_origin_asset_tests")
293
328
  autoload :RunStiTests, action_root.join("run_sti_tests")
294
329
  autoload :RunOriginAggregatedLoggingTests, action_root.join("run_origin_aggregated_logging_tests")
295
330
  autoload :GenerateTemplate, action_root.join("generate_template")
@@ -297,6 +332,7 @@ module Vagrant
297
332
  autoload :ModifyInstance, action_root.join("modify_instance")
298
333
  autoload :ModifyAMI, action_root.join("modify_ami")
299
334
  autoload :DownloadArtifactsOrigin, action_root.join("download_artifacts_origin")
335
+ autoload :DownloadArtifactsOriginConsole, action_root.join("download_artifacts_origin_console")
300
336
  autoload :DownloadArtifactsSti, action_root.join("download_artifacts_sti")
301
337
  autoload :DownloadArtifactsOriginAggregatedLogging, action_root.join("download_artifacts_origin_aggregated_logging")
302
338
  autoload :TestExitCode, action_root.join("test_exit_code")
@@ -37,7 +37,7 @@ module Vagrant
37
37
  if [ -d #{bare_repo_path} ]; then
38
38
  rm -rf #{repo_path}
39
39
  echo 'Cloning #{repo_name} ...'
40
- git clone --quiet #{bare_repo_path} #{repo_path}
40
+ git clone --quiet --recurse-submodules #{bare_repo_path} #{repo_path}
41
41
  }
42
42
 
43
43
  if @options[:branch] && @options[:branch][repo_name]
@@ -65,4 +65,4 @@ fi
65
65
  end
66
66
  end
67
67
  end
68
- end
68
+ end
@@ -38,9 +38,7 @@ module Vagrant
38
38
  "/var/log/yum.log" => artifacts_dir + "yum.log",
39
39
  "/var/log/secure" => artifacts_dir + "secure",
40
40
  "/var/log/audit/audit.log" => artifacts_dir + "audit.log",
41
- "/tmp/openshift/" => artifacts_dir,
42
-
43
- "/data/src/github.com/openshift/origin/assets/test/tmp/screenshots/" => artifacts_dir + "screenshots/"
41
+ "/tmp/openshift/" => artifacts_dir
44
42
  }
45
43
 
46
44
  if @options[:download_release]
@@ -0,0 +1,74 @@
1
+ #--
2
+ # Copyright 2013 Red Hat, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #++
16
+ require 'pathname'
17
+
18
+ module Vagrant
19
+ module Openshift
20
+ module Action
21
+ class DownloadArtifactsOriginConsole
22
+ include CommandHelper
23
+
24
+ def initialize(app, env)
25
+ @app = app
26
+ @env = env
27
+ end
28
+
29
+ def call(env)
30
+ machine = @env[:machine]
31
+ machine.ui.info "Downloading any failure screenshots"
32
+ ssh_info = machine.ssh_info
33
+ private_key_path = ssh_info[:private_key_path].kind_of?(Array) ? ssh_info[:private_key_path][0] : ssh_info[:private_key_path]
34
+
35
+ artifacts_dir = Pathname.new(File.expand_path(machine.env.root_path + "artifacts"))
36
+
37
+ _,_,exit_code = do_execute machine, "mkdir -p /tmp/openshift && journalctl -u openshift --no-pager > /tmp/openshift/openshift.log", :fail_on_error => false
38
+ if exit_code != 0
39
+ machine.ui.warn "Unable to dump openshift log from journalctl"
40
+ end
41
+
42
+ download_map = {
43
+ "/var/log/yum.log" => artifacts_dir + "yum.log",
44
+ "/var/log/secure" => artifacts_dir + "secure",
45
+ "/var/log/audit/audit.log" => artifacts_dir + "audit.log",
46
+ "/tmp/openshift/" => artifacts_dir,
47
+ "/data/src/github.com/openshift/origin-web-console/test/tmp/screenshots/" => artifacts_dir + "screenshots/"
48
+ }
49
+
50
+ download_map.each do |source,target|
51
+ if ! machine.communicate.test("sudo ls #{source}")
52
+ machine.ui.info "#{source} did not exist on the remote system. This is often the case for tests that were not run."
53
+ next
54
+ end
55
+
56
+ machine.ui.info "Downloading artifacts from '#{source}' to '#{target}'"
57
+ if target.to_s.end_with? '/'
58
+ FileUtils.mkdir_p target.to_s
59
+ else
60
+ FileUtils.mkdir_p File.dirname(target.to_s)
61
+ end
62
+
63
+ command = "/usr/bin/rsync -az -e 'ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i #{private_key_path}' --rsync-path='sudo rsync' --exclude='volumes/*' --exclude='volumes/' #{ssh_info[:username]}@#{ssh_info[:host]}:#{source} #{target}"
64
+
65
+ if not system(command)
66
+ machine.ui.warn "Unable to download artifacts"
67
+ end
68
+ end
69
+ @app.call(env)
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
@@ -30,7 +30,7 @@ module Vagrant
30
30
  cmd = %{
31
31
  set -ex
32
32
 
33
- ORIGIN_PATH=/data/src/github.com/openshift/origin
33
+ ORIGIN_CONSOLE_PATH=/data/src/github.com/openshift/origin-web-console
34
34
  ASSET_BACKUP_DIR=/data/asset_dependencies
35
35
 
36
36
  if ! which npm > /dev/null 2>&1 ; then
@@ -45,16 +45,16 @@ fi
45
45
  # make sure the dirs always exist
46
46
  mkdir -p /data/asset_dependencies/node_modules
47
47
  mkdir -p /data/asset_dependencies/bower_components
48
- # copy them to the assets dir
49
- cp -rf $ASSET_BACKUP_DIR/node_modules $ORIGIN_PATH/assets/node_modules
50
- cp -rf $ASSET_BACKUP_DIR/bower_components $ORIGIN_PATH/assets/bower_components
48
+ # copy them to the console repo
49
+ cp -rf $ASSET_BACKUP_DIR/node_modules $ORIGIN_CONSOLE_PATH/node_modules
50
+ cp -rf $ASSET_BACKUP_DIR/bower_components $ORIGIN_CONSOLE_PATH/bower_components
51
51
 
52
52
  }
53
53
  end
54
54
 
55
55
  cmd += %{
56
- pushd $ORIGIN_PATH
57
- hack/install-assets.sh
56
+ pushd $ORIGIN_CONSOLE_PATH
57
+ hack/install-deps.sh
58
58
  popd
59
59
 
60
60
  }
@@ -62,12 +62,12 @@ popd
62
62
  if @options[:backup_assets]
63
63
  cmd += %{
64
64
  # Make sure tests pass before backing up this asset install
65
- pushd $ORIGIN_PATH
66
- hack/test-assets.sh
65
+ pushd $ORIGIN_CONSOLE_PATH
66
+ grunt test
67
67
  popd
68
68
  mkdir -p $ASSET_BACKUP_DIR
69
- cp -rf $ORIGIN_PATH/assets/node_modules $ASSET_BACKUP_DIR/node_modules
70
- cp -rf $ORIGIN_PATH/assets/bower_components $ASSET_BACKUP_DIR/bower_components
69
+ cp -rf $ORIGIN_CONSOLE_PATH/node_modules $ASSET_BACKUP_DIR/node_modules
70
+ cp -rf $ORIGIN_CONSOLE_PATH/bower_components $ASSET_BACKUP_DIR/bower_components
71
71
  }
72
72
  end
73
73
 
@@ -131,6 +131,8 @@ chown root /usr/bin/chromedriver
131
131
  chmod 755 /usr/bin/chromedriver
132
132
  }, :timeout=>60*60, :verbose => false)
133
133
 
134
+ sudo(env[:machine], "wget -O /etc/yum.repos.d/openshift-rhel7-dependencies.repo https://mirror.openshift.com/pub/openshift-origin/nightly/rhel-7/dependencies/openshift-rhel7-dependencies.repo", fail_on_error: true, :timeout=>60*20, :verbose => true)
135
+
134
136
  #
135
137
  # FIXME: Need to install golang packages 'after' the 'gcc' is
136
138
  # installed. See BZ#1101508
@@ -56,11 +56,11 @@ docker tag -f #{rhel_namespace}/#{image_name}-rhel7 #{registry}#{rhel_namespace}
56
56
  # We can't fully parallelize this because docker fails when you push to the same repo at the
57
57
  # same time (using different tags), so we do two groups of push operations.
58
58
  # this one is failing in parallel for unknown reasons
59
- docker push -f #{registry}#{rhel_namespace}/#{image_name}-rhel7:#{git_ref}
59
+ docker push #{registry}#{rhel_namespace}/#{image_name}-rhel7:#{git_ref}
60
60
 
61
- procs[0]="docker push -f #{registry}#{centos_namespace}/#{image_name}-centos7:#{git_ref}"
62
- procs[1]="docker push -f docker.io/#{centos_namespace}/#{image_name}-centos7:latest"
63
- #procs[2]="docker push -f #{registry}#{rhel_namespace}/#{image_name}-rhel7:#{git_ref}"
61
+ procs[0]="docker push #{registry}#{centos_namespace}/#{image_name}-centos7:#{git_ref}"
62
+ procs[1]="docker push docker.io/#{centos_namespace}/#{image_name}-centos7:latest"
63
+ #procs[2]="docker push #{registry}#{rhel_namespace}/#{image_name}-rhel7:#{git_ref}"
64
64
 
65
65
  # Run pushes in parallel
66
66
  for i in {0..1}; do
@@ -76,8 +76,8 @@ for pid in ${pids[*]}; do
76
76
  wait $pid
77
77
  done
78
78
 
79
- procs[0]="docker push -f #{registry}#{centos_namespace}/#{image_name}-centos7:latest"
80
- procs[1]="docker push -f #{registry}#{rhel_namespace}/#{image_name}-rhel7:latest"
79
+ procs[0]="docker push #{registry}#{centos_namespace}/#{image_name}-centos7:latest"
80
+ procs[1]="docker push #{registry}#{rhel_namespace}/#{image_name}-rhel7:latest"
81
81
 
82
82
  # Run pushes in parallel
83
83
  for i in {0..1}; do
@@ -0,0 +1,82 @@
1
+ #--
2
+ # Copyright 2013 Red Hat, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #++
16
+
17
+ module Vagrant
18
+ module Openshift
19
+ module Action
20
+ class RunOriginAssetTests
21
+ include CommandHelper
22
+
23
+ @@SSH_TIMEOUT = 4800
24
+
25
+ def initialize(app, env, options)
26
+ @app = app
27
+ @env = env
28
+ @options = options.clone
29
+ end
30
+
31
+ def run_tests(env, cmds, as_root=true)
32
+ tests = ''
33
+ cmds.each do |cmd|
34
+ tests += "
35
+ echo '***************************************************'
36
+ echo 'Running #{cmd}...'
37
+ time #{cmd}
38
+ echo 'Finished #{cmd}'
39
+ echo '***************************************************'
40
+ "
41
+ end
42
+ cmd = %{
43
+ set -e
44
+ pushd #{Constants.build_dir}/origin-web-console >/dev/null
45
+ export PATH=$GOPATH/bin:$PATH
46
+ #{tests}
47
+ popd >/dev/null
48
+ }
49
+ exit_code = 0
50
+ if as_root
51
+ _,_,exit_code = sudo(env[:machine], cmd, {:timeout => 60*60*4, :fail_on_error => false, :verbose => false})
52
+ else
53
+ _,_,exit_code = do_execute(env[:machine], cmd, {:timeout => 60*60*4, :fail_on_error => false, :verbose => false})
54
+ end
55
+ exit_code
56
+ end
57
+
58
+ #
59
+ # All env vars will be added to the beginning of the commands
60
+ #
61
+ def call(env)
62
+ @options.delete :logs
63
+
64
+ cmds = []
65
+
66
+ if @options[:envs]
67
+ cmds += @options[:envs]
68
+ end
69
+
70
+ cmds << 'hack/verify-dist.sh'
71
+ cmds << 'grunt test'
72
+ cmds << 'hack/test-integration-headless.sh'
73
+ cmd = cmds.join(' ')
74
+ env[:test_exit_code] = run_tests(env, cmds, @options[:root])
75
+
76
+ @app.call(env)
77
+ end
78
+
79
+ end
80
+ end
81
+ end
82
+ end
@@ -67,8 +67,6 @@ popd >/dev/null
67
67
  @options.delete :logs
68
68
 
69
69
  cmd_env = []
70
- cmd_env << 'TEST_ASSETS=true'
71
- cmd_env << 'TEST_ASSETS_HEADLESS=true'
72
70
  if @options[:skip_image_cleanup]
73
71
  cmd_env << 'SKIP_IMAGE_CLEANUP=1'
74
72
  end
@@ -124,12 +122,6 @@ popd >/dev/null
124
122
  env[:test_exit_code] = run_tests(env, cmds, @options[:root])
125
123
  end
126
124
 
127
- # any other tests that should not be run as sudo
128
- if env[:test_exit_code] == 0 && @options[:all]
129
- cmds = ['hack/test-assets.sh']
130
- env[:test_exit_code] = run_tests(env, cmds, @options[:root])
131
- end
132
-
133
125
  @app.call(env)
134
126
  end
135
127
 
@@ -0,0 +1,49 @@
1
+ #--
2
+ # Copyright 2013 Red Hat, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #++
16
+ require_relative "../action"
17
+
18
+ module Vagrant
19
+ module Openshift
20
+ module Commands
21
+ class DownloadArtifactsOriginConsole < Vagrant.plugin(2, :command)
22
+ include CommandHelper
23
+
24
+ def self.synopsis
25
+ "download the origin-web-console test artifacts"
26
+ end
27
+
28
+ def execute
29
+ options = {}
30
+
31
+ opts = OptionParser.new do |o|
32
+ o.banner = "Usage: vagrant download-artifacts-origin-console [machine-name]"
33
+ o.separator ""
34
+ end
35
+
36
+ # Parse the options
37
+ argv = parse_options(opts)
38
+ return if !argv
39
+
40
+ with_target_vms(argv, :reverse => true) do |machine|
41
+ actions = Vagrant::Openshift::Action.download_origin_console_artifacts(options)
42
+ @env.action_runner.run actions, {:machine => machine}
43
+ 0
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,66 @@
1
+ #--
2
+ # Copyright 2013 Red Hat, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #++
16
+ require_relative "../action"
17
+
18
+ module Vagrant
19
+ module Openshift
20
+ module Commands
21
+ class RepoSyncOriginConsole < Vagrant.plugin(2, :command)
22
+ include CommandHelper
23
+
24
+ def self.synopsis
25
+ "syncs your local repos to the current instance"
26
+ end
27
+
28
+ def execute
29
+ options = {}
30
+ options[:images] = true
31
+ options[:build] = true
32
+ options[:clean] = false
33
+ options[:source] = false
34
+
35
+ opts = OptionParser.new do |o|
36
+ o.banner = "Usage: vagrant sync-origin-console [vm-name]"
37
+ o.separator ""
38
+
39
+ o.on("-c", "--clean", "Delete existing repo before syncing") do |f|
40
+ options[:clean] = f
41
+ end
42
+
43
+ o.on("-s", "--source", "Sync the source (not required if using synced folders)") do |f|
44
+ options[:source] = f
45
+ end
46
+
47
+ o.on("--dont-install", "Don't build and install updated source") do |f|
48
+ options[:build] = false
49
+ end
50
+
51
+ end
52
+
53
+ # Parse the options
54
+ argv = parse_options(opts)
55
+ return if !argv
56
+
57
+ with_target_vms(argv, :reverse => true) do |machine|
58
+ actions = Vagrant::Openshift::Action.repo_sync_origin_console(options)
59
+ @env.action_runner.run actions, {:machine => machine}
60
+ 0
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,61 @@
1
+ #--
2
+ # Copyright 2013 Red Hat, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #++
16
+ require_relative "../action"
17
+
18
+ module Vagrant
19
+ module Openshift
20
+ module Commands
21
+ class TestOriginConsole < Vagrant.plugin(2, :command)
22
+ include CommandHelper
23
+
24
+ def self.synopsis
25
+ "run the origin web console tests"
26
+ end
27
+
28
+ def execute
29
+ options = {}
30
+ options[:download] = false
31
+ options[:all] = false
32
+ options[:extended_test_packages] = ""
33
+
34
+ opts = OptionParser.new do |o|
35
+ o.banner = "Usage: vagrant test-origin-console [machine-name]"
36
+ o.separator ""
37
+
38
+ o.on("-d","--artifacts", String, "Download logs and screenshots") do |f|
39
+ options[:download] = true
40
+ end
41
+
42
+ o.on("", "--env ENV=VALUE", String, "Environment variable to execute tests with") do |f|
43
+ options[:envs] = [] unless options[:envs]
44
+ options[:envs] << f
45
+ end
46
+ end
47
+
48
+ # Parse the options
49
+ argv = parse_options(opts)
50
+ return if !argv
51
+
52
+ with_target_vms(argv, :reverse => true) do |machine|
53
+ actions = Vagrant::Openshift::Action.run_origin_asset_tests(options)
54
+ @env.action_runner.run actions, {:machine => machine}
55
+ 0
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -30,7 +30,14 @@ module Vagrant
30
30
  def self.openshift_repos
31
31
  {
32
32
  'origin' => 'https://github.com/openshift/origin.git',
33
- 'source-to-image' => 'https://github.com/openshift/source-to-image.git'
33
+ 'source-to-image' => 'https://github.com/openshift/source-to-image.git',
34
+ 'origin-web-console' => 'https://github.com/openshift/origin-web-console.git'
35
+ }
36
+ end
37
+
38
+ def self.console_repos
39
+ {
40
+ 'origin-web-console' => 'https://github.com/openshift/origin-web-console.git'
34
41
  }
35
42
  end
36
43
 
@@ -44,6 +51,7 @@ module Vagrant
44
51
  {
45
52
  'origin' => openshift_repos,
46
53
  nil => openshift_repos,
54
+ 'origin-console' => console_repos,
47
55
  'origin-aggregated-logging' => aggregated_logging_repos
48
56
  }[reponame]
49
57
  end
@@ -60,7 +60,7 @@ module Vagrant
60
60
  Timeout::timeout(options[:timeout]) do
61
61
  if options[:sudo]
62
62
  rc = machine.communicate.sudo(command, nil, &execute)
63
- else
63
+ else
64
64
  rc = machine.communicate.execute(command, nil, &execute)
65
65
  end
66
66
  end
@@ -162,7 +162,7 @@ echo 'Cloning #{repo} ...'
162
162
  user_repo_url="git@github.com:#{@options[:user]}/#{repo}"
163
163
  command += %{
164
164
  echo 'Cloning #{user_repo_url}'
165
- git clone --quiet #{user_repo_url}
165
+ git clone --quiet --recurse-submodules #{user_repo_url}
166
166
  if [ $? -eq 0 ]; then
167
167
  cloned=true
168
168
  (cd #{repo} && git remote add upstream #{url} && git fetch upstream)
@@ -173,7 +173,7 @@ fi
173
173
 
174
174
  end
175
175
  command += %{
176
- [ $cloned != true ] && git clone --quiet #{url}
176
+ [ $cloned != true ] && git clone --quiet --recurse-submodules #{url}
177
177
  ( cd #{repo} && git checkout #{@options[:branch]} &>/dev/null)
178
178
  }
179
179
  end
@@ -37,6 +37,11 @@ module Vagrant
37
37
  Commands::RepoSyncOrigin
38
38
  end
39
39
 
40
+ command "sync-origin-console" do
41
+ require_relative "command/repo_sync_origin_console"
42
+ Commands::RepoSyncOriginConsole
43
+ end
44
+
40
45
  command "sync-sti" do
41
46
  require_relative "command/repo_sync_sti"
42
47
  Commands::RepoSyncSti
@@ -122,6 +127,11 @@ module Vagrant
122
127
  Commands::TestOrigin
123
128
  end
124
129
 
130
+ command "test-origin-console" do
131
+ require_relative "command/test_origin_console"
132
+ Commands::TestOriginConsole
133
+ end
134
+
125
135
  command "test-sti" do
126
136
  require_relative "command/test_sti"
127
137
  Commands::TestSti
@@ -137,6 +147,11 @@ module Vagrant
137
147
  Commands::DownloadArtifactsOrigin
138
148
  end
139
149
 
150
+ command "download-artifacts-origin-console" do
151
+ require_relative "command/download_artifacts_origin_console"
152
+ Commands::DownloadArtifactsOriginConsole
153
+ end
154
+
140
155
  command "download-artifacts-origin-aggregated-logging" do
141
156
  require_relative "command/download_artifacts_origin_aggregated_logging"
142
157
  Commands::DownloadArtifactsOriginAggregatedLogging
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Vagrant
18
18
  module Openshift
19
- VERSION = "3.0.7"
19
+ VERSION = "3.0.8"
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-openshift
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.7
4
+ version: 3.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Red Hat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-02 00:00:00.000000000 Z
11
+ date: 2016-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -139,6 +139,7 @@ files:
139
139
  - lib/vagrant-openshift/action/create_yum_repositories.rb
140
140
  - lib/vagrant-openshift/action/download_artifacts_origin.rb
141
141
  - lib/vagrant-openshift/action/download_artifacts_origin_aggregated_logging.rb
142
+ - lib/vagrant-openshift/action/download_artifacts_origin_console.rb
142
143
  - lib/vagrant-openshift/action/download_artifacts_sti.rb
143
144
  - lib/vagrant-openshift/action/generate_template.rb
144
145
  - lib/vagrant-openshift/action/install_origin.rb
@@ -152,6 +153,7 @@ files:
152
153
  - lib/vagrant-openshift/action/push_openshift_images.rb
153
154
  - lib/vagrant-openshift/action/push_openshift_release.rb
154
155
  - lib/vagrant-openshift/action/run_origin_aggregated_logging_tests.rb
156
+ - lib/vagrant-openshift/action/run_origin_asset_tests.rb
155
157
  - lib/vagrant-openshift/action/run_origin_tests.rb
156
158
  - lib/vagrant-openshift/action/run_sti_tests.rb
157
159
  - lib/vagrant-openshift/action/run_systemctl.rb
@@ -173,6 +175,7 @@ files:
173
175
  - lib/vagrant-openshift/command/create_local_yum_repo.rb
174
176
  - lib/vagrant-openshift/command/download_artifacts_origin.rb
175
177
  - lib/vagrant-openshift/command/download_artifacts_origin_aggregated_logging.rb
178
+ - lib/vagrant-openshift/command/download_artifacts_origin_console.rb
176
179
  - lib/vagrant-openshift/command/download_artifacts_sti.rb
177
180
  - lib/vagrant-openshift/command/install_origin.rb
178
181
  - lib/vagrant-openshift/command/install_origin_assets_base.rb
@@ -184,9 +187,11 @@ files:
184
187
  - lib/vagrant-openshift/command/push_openshift_release.rb
185
188
  - lib/vagrant-openshift/command/repo_sync_origin.rb
186
189
  - lib/vagrant-openshift/command/repo_sync_origin_aggregated_logging.rb
190
+ - lib/vagrant-openshift/command/repo_sync_origin_console.rb
187
191
  - lib/vagrant-openshift/command/repo_sync_sti.rb
188
192
  - lib/vagrant-openshift/command/test_origin.rb
189
193
  - lib/vagrant-openshift/command/test_origin_aggregated_logging.rb
194
+ - lib/vagrant-openshift/command/test_origin_console.rb
190
195
  - lib/vagrant-openshift/command/test_origin_image.rb
191
196
  - lib/vagrant-openshift/command/test_sti.rb
192
197
  - lib/vagrant-openshift/command/try_restart_origin.rb