mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-02-05 15:46:47 +01:00
Readd vbox tests
This commit is contained in:
@@ -17,7 +17,6 @@ export PKT_VAGRANT_HOST_MEMORY="${VAGRANT_HOST_MEMORY:-10000}"
|
|||||||
export PKT_VAGRANT_CWD="test/vagrant-spec/"
|
export PKT_VAGRANT_CWD="test/vagrant-spec/"
|
||||||
export PKT_VAGRANT_VAGRANTFILE=Vagrantfile.spec
|
export PKT_VAGRANT_VAGRANTFILE=Vagrantfile.spec
|
||||||
export PKT_VAGRANT_SPEC_PROVIDERS="${VAGRANT_SPEC_PROVIDERS}"
|
export PKT_VAGRANT_SPEC_PROVIDERS="${VAGRANT_SPEC_PROVIDERS}"
|
||||||
export PKT_VAGRANT_DOCKER_IMAGES="${VAGRANT_DOCKER_IMAGES}"
|
|
||||||
###
|
###
|
||||||
|
|
||||||
# Grab vagrant-spec gem and place inside root dir of Vagrant repo
|
# Grab vagrant-spec gem and place inside root dir of Vagrant repo
|
||||||
|
|||||||
18
.github/workflows/spectesting.yml
vendored
18
.github/workflows/spectesting.yml
vendored
@@ -25,21 +25,20 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
host_os: ['hashicorp/bionic64']
|
host_os: ['hashicorp/bionic64']
|
||||||
guest_os: ['']
|
guest_os: ['hashicorp-vagrant/ubuntu-16.04']
|
||||||
docker_images: ['nginx']
|
providers: ['docker', 'virtualbox']
|
||||||
steps:
|
steps:
|
||||||
- name: Code Checkout
|
- name: Code Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
- name: Create packet host for tests
|
- name: Create packet host for tests (provider ${{ matrix.providers }})
|
||||||
run: ./.ci/spec/create-hosts.sh
|
run: ./.ci/spec/create-hosts.sh
|
||||||
working-directory: ${{github.workspace}}
|
working-directory: ${{github.workspace}}
|
||||||
env:
|
env:
|
||||||
VAGRANT_HOST_BOXES: ${{matrix.host_os}}
|
VAGRANT_HOST_BOXES: ${{matrix.host_os}}
|
||||||
VAGRANT_GUEST_BOXES: ${{matrix.guest_os}}
|
VAGRANT_GUEST_BOXES: ${{matrix.guest_os}}
|
||||||
VAGRANT_PRERELEASE_VERSION: ${{ github.event.client_payload.prerelease_version }}
|
VAGRANT_PRERELEASE_VERSION: ${{ github.event.client_payload.prerelease_version }}
|
||||||
VAGRANT_SPEC_PROVIDERS: 'docker'
|
VAGRANT_SPEC_PROVIDERS: ${{matrix.providers}}
|
||||||
VAGRANT_DOCKER_IMAGES: ${{matrix.docker_images}}
|
|
||||||
|
|
||||||
spec-tests:
|
spec-tests:
|
||||||
if: github.repository == 'hashicorp/vagrant-blackbox'
|
if: github.repository == 'hashicorp/vagrant-blackbox'
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
@@ -48,16 +47,17 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
host_os: ['hashicorp/bionic64']
|
host_os: ['hashicorp/bionic64']
|
||||||
guest_os: ['']
|
guest_os: ['hashicorp-vagrant/ubuntu-16.04']
|
||||||
docker_images: ['nginx']
|
docker_images: ['nginx']
|
||||||
|
providers: ['docker', 'virtualbox']
|
||||||
steps:
|
steps:
|
||||||
- name: Run Tests with host ${{ matrix.host_os }} using guest ${{ matrix.guest_os }}
|
- name: Run Tests with host ${{ matrix.host_os }} using provider ${{ matrix.providers }}
|
||||||
run: ./.ci/spec/run-test.sh
|
run: ./.ci/spec/run-test.sh
|
||||||
working-directory: ${{github.workspace}}
|
working-directory: ${{github.workspace}}
|
||||||
env:
|
env:
|
||||||
VAGRANT_HOST_BOXES: ${{matrix.host_os}}
|
VAGRANT_HOST_BOXES: ${{matrix.host_os}}
|
||||||
VAGRANT_GUEST_BOXES: ${{matrix.guest_os}}
|
VAGRANT_GUEST_BOXES: ${{matrix.guest_os}}
|
||||||
VAGRANT_SPEC_PROVIDERS: 'docker'
|
VAGRANT_SPEC_PROVIDERS: ${{matrix.providers}}
|
||||||
VAGRANT_DOCKER_IMAGES: ${{matrix.docker_images}}
|
VAGRANT_DOCKER_IMAGES: ${{matrix.docker_images}}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
# Guest boxes to use for vagrant-spec
|
# Guest boxes to use for vagrant-spec
|
||||||
GUEST_BOXES = {
|
GUEST_BOXES = {
|
||||||
'hashicorp/bionic64' => '1.0.282',
|
'hashicorp/bionic64' => '1.0.282',
|
||||||
# 'hashicorp-vagrant/ubuntu-16.04' => '1.0.1',
|
'hashicorp-vagrant/ubuntu-16.04' => '1.0.1',
|
||||||
# 'hashicorp-vagrant/centos-7.4' => '1.0.2',
|
'hashicorp-vagrant/centos-7.4' => '1.0.2',
|
||||||
# 'hashicorp-vagrant/windows-10' => '1.0.0',
|
'hashicorp-vagrant/windows-10' => '1.0.0',
|
||||||
# 'spox/osx-10.12' => '0.0.1'
|
'spox/osx-10.12' => '0.0.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
DOCKER_IMAGES = {
|
DOCKER_IMAGES = {
|
||||||
@@ -17,10 +17,10 @@ DOCKER_IMAGES = {
|
|||||||
# Host boxes to run vagrant-spec
|
# Host boxes to run vagrant-spec
|
||||||
HOST_BOXES = {
|
HOST_BOXES = {
|
||||||
'hashicorp/bionic64' => '1.0.282',
|
'hashicorp/bionic64' => '1.0.282',
|
||||||
# 'hashicorp-vagrant/ubuntu-16.04' => '1.0.1',
|
'hashicorp-vagrant/ubuntu-16.04' => '1.0.1',
|
||||||
# 'hashicorp-vagrant/centos-7.4' => '1.0.2',
|
'hashicorp-vagrant/centos-7.4' => '1.0.2',
|
||||||
# 'hashicorp-vagrant/windows-10' => '1.0.0',
|
'hashicorp-vagrant/windows-10' => '1.0.0',
|
||||||
# 'spox/osx-10.12' => '0.0.1'
|
'spox/osx-10.12' => '0.0.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Not all boxes are named by their specific "platform"
|
# Not all boxes are named by their specific "platform"
|
||||||
@@ -28,8 +28,8 @@ HOST_BOXES = {
|
|||||||
PLATFORM_SCRIPT_MAPPING = {
|
PLATFORM_SCRIPT_MAPPING = {
|
||||||
"ubuntu" => "ubuntu",
|
"ubuntu" => "ubuntu",
|
||||||
"bionic" => "ubuntu",
|
"bionic" => "ubuntu",
|
||||||
# "centos" => "centos",
|
"centos" => "centos",
|
||||||
# "windows" => "windows"
|
"windows" => "windows"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Determine what providers to test
|
# Determine what providers to test
|
||||||
@@ -73,7 +73,6 @@ end
|
|||||||
Vagrant.configure(2) do |global_config|
|
Vagrant.configure(2) do |global_config|
|
||||||
host_boxes.each do |box_name, box_version|
|
host_boxes.each do |box_name, box_version|
|
||||||
platform = box_name.split('/').last.sub(/[^a-z]+$/, '')
|
platform = box_name.split('/').last.sub(/[^a-z]+$/, '')
|
||||||
|
|
||||||
enabled_providers.each do |provider_name|
|
enabled_providers.each do |provider_name|
|
||||||
global_config.vm.define("#{box_name.split('/').last}-#{provider_name}") do |config|
|
global_config.vm.define("#{box_name.split('/').last}-#{provider_name}") do |config|
|
||||||
config.vm.box = box_name
|
config.vm.box = box_name
|
||||||
@@ -105,7 +104,7 @@ Vagrant.configure(2) do |global_config|
|
|||||||
path: "./scripts/#{platform}-run.#{provider_name}.ps1",
|
path: "./scripts/#{platform}-run.#{provider_name}.ps1",
|
||||||
keep_color: true,
|
keep_color: true,
|
||||||
env: {
|
env: {
|
||||||
"VAGRANT_SPEC_ARGS" => "--no-builtin #{spec_cmd_args}".strip,
|
"VAGRANT_SPEC_ARGS" => "--no-builtin --component provider/docker/docker/* #{spec_cmd_args}".strip,
|
||||||
"VAGRANT_SPEC_DOCKER_IMAGE" => docker_image
|
"VAGRANT_SPEC_DOCKER_IMAGE" => docker_image
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user