Sha256: cf4e0ec3f73ea499c38c508a007e4edc366f0a35d43bbee49fcfcb7db941d19f

Contents?: true

Size: 1.52 KB

Versions: 16

Compression:

Stored size: 1.52 KB

Contents

run_tf "plan"

run_tf "apply"

ruby_block "install via winrm api" do
  block do
    # We do this hackery to ensure we load mixlib-install from source
    install_command = "install -project angry-omnibus-toolchain -channel current -version 1.1.57"

    shellout_command = <<-EOF.gsub /^\s*/, ""
      bundle exec ruby -e "require 'mixlib/install';\
      puts Mixlib::Install.install_ps1, '#{install_command}'"
    EOF

    require "mixlib/shellout"

    print_script = Mixlib::ShellOut.new(
      shellout_command,
      cwd: node['chef-acceptance']['suite-dir']
    )
    print_script.run_command

    run_shell(print_script.stdout)
  end
end

ruby_block "set omnibus paths" do
  block do
    toolchain_install_dir = File.join('c:', 'opscode', 'angry-omnibus-toolchain')

    omnibus_env = []
    omnibus_env << File.join(toolchain_install_dir, 'embedded', 'bin')
    omnibus_env << File.join(toolchain_install_dir, 'embedded', 'bin', 'mingw64', 'bin')
    omnibus_env << File.join(toolchain_install_dir, 'embedded', 'bin', 'usr', 'bin')
    omnibus_env << File.join(toolchain_install_dir, 'embedded', 'git', 'cmd')
    omnibus_env << File.join(toolchain_install_dir, 'embedded', 'git', 'mingw64', 'libexec', 'git-core')

    # Join paths by semi-colons then replace forwardslashes with backslashes
    omnibus_path = omnibus_env.join(";").gsub("/", "\\")

    # Permanently set omnibus path to machine PATH
    script = <<-EOF.gsub /^\s*/, ""
      $env:path += ';#{omnibus_path}'
      setx PATH $env:path /M
    EOF

    run_shell(script)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
mixlib-install-3.9.0 acceptance/.suites/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.8.0 acceptance/.suites/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.7.0 acceptance/.suites/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.6.0 acceptance/.suites/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.5.1 acceptance/.suites/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.5.0 acceptance/.suites/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.4.0 acceptance/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.3.4 acceptance/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.3.3 acceptance/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.3.2 acceptance/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.3.1 acceptance/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.3.0 acceptance/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.2.2 acceptance/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.2.1 acceptance/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.2.0 acceptance/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb
mixlib-install-3.1.0 acceptance/windows-nano/.acceptance/acceptance-cookbook/recipes/provision.rb