Merge pull request #261 from hashicorp/add-docker-to-ci
Add docker to Nightly CI
This commit is contained in:
commit
b6feb025ba
@ -4,6 +4,7 @@
|
|||||||
export SLACK_USERNAME="Vagrant"
|
export SLACK_USERNAME="Vagrant"
|
||||||
export SLACK_ICON="https://media.giphy.com/media/yIQ5glQeheYE0/200.gif"
|
export SLACK_ICON="https://media.giphy.com/media/yIQ5glQeheYE0/200.gif"
|
||||||
export SLACK_TITLE="Vagrant-Spec Test Runner"
|
export SLACK_TITLE="Vagrant-Spec Test Runner"
|
||||||
|
export SLACK_CHANNEL="CLYRTANRH" # CLYRTANRH is ID of #team-vagrant-spam-channel
|
||||||
export PACKET_EXEC_DEVICE_NAME="${PACKET_EXEC_DEVICE_NAME:-spec-ci-boxes}"
|
export PACKET_EXEC_DEVICE_NAME="${PACKET_EXEC_DEVICE_NAME:-spec-ci-boxes}"
|
||||||
export PACKET_EXEC_DEVICE_SIZE="${PACKET_EXEC_DEVICE_SIZE:-c3.small.x86,c3.medium.x86}"
|
export PACKET_EXEC_DEVICE_SIZE="${PACKET_EXEC_DEVICE_SIZE:-c3.small.x86,c3.medium.x86}"
|
||||||
export PACKET_EXEC_PREFER_FACILITIES="${PACKET_EXEC_PREFER_FACILITIES:-la4,dc10,dc13,ny7,pa4,md2}"
|
export PACKET_EXEC_PREFER_FACILITIES="${PACKET_EXEC_PREFER_FACILITIES:-la4,dc10,dc13,ny7,pa4,md2}"
|
||||||
|
|||||||
7
.github/workflows/spectesting.yml
vendored
7
.github/workflows/spectesting.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
host_os: ['hashicorp/bionic64']
|
host_os: ['hashicorp/bionic64']
|
||||||
guest_os: ['hashicorp-vagrant/ubuntu-16.04']
|
guest_os: ['hashicorp-vagrant/ubuntu-16.04']
|
||||||
providers: ['virtualbox']
|
providers: ['virtualbox', 'docker']
|
||||||
steps:
|
steps:
|
||||||
- name: Code Checkout
|
- name: Code Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
@ -54,7 +54,7 @@ jobs:
|
|||||||
host_os: ['hashicorp/bionic64']
|
host_os: ['hashicorp/bionic64']
|
||||||
guest_os: ['hashicorp-vagrant/ubuntu-16.04']
|
guest_os: ['hashicorp-vagrant/ubuntu-16.04']
|
||||||
docker_images: ['nginx']
|
docker_images: ['nginx']
|
||||||
providers: ['virtualbox']
|
providers: ['virtualbox', 'docker']
|
||||||
steps:
|
steps:
|
||||||
- name: Run Tests with host ${{ matrix.host_os }} using provider ${{ matrix.providers }}
|
- name: Run Tests with host ${{ matrix.host_os }} using provider ${{ matrix.providers }}
|
||||||
run: ./.ci/spec/run-test.sh
|
run: ./.ci/spec/run-test.sh
|
||||||
@ -78,10 +78,9 @@ jobs:
|
|||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
name: Cleanup Post Vagrant-Spec Tests
|
name: Cleanup Post Vagrant-Spec Tests
|
||||||
needs: spec-tests
|
needs: spec-tests
|
||||||
|
if: always()
|
||||||
steps:
|
steps:
|
||||||
- name: Clean Packet
|
- name: Clean Packet
|
||||||
if: always()
|
|
||||||
run: ./.ci/spec/clean-packet.sh
|
run: ./.ci/spec/clean-packet.sh
|
||||||
- name: Clean Workspace
|
- name: Clean Workspace
|
||||||
if: always()
|
|
||||||
run: rm -rf ${{ github.workspace }}
|
run: rm -rf ${{ github.workspace }}
|
||||||
|
|||||||
@ -119,7 +119,10 @@ Vagrant.configure(2) do |global_config|
|
|||||||
keep_color: true,
|
keep_color: true,
|
||||||
env: {
|
env: {
|
||||||
"VAGRANT_SPEC_ARGS" => "test --components provider/docker/docker/* #{spec_cmd_args}".strip,
|
"VAGRANT_SPEC_ARGS" => "test --components provider/docker/docker/* #{spec_cmd_args}".strip,
|
||||||
"VAGRANT_SPEC_DOCKER_IMAGE" => docker_image
|
"VAGRANT_SPEC_DOCKER_IMAGE" => docker_image,
|
||||||
|
"VAGRANT_LOG" => "trace",
|
||||||
|
"VAGRANT_LOG_LEVEL" => "trace",
|
||||||
|
"VAGRANT_SPEC_LOG_PATH" => "/tmp/vagrant-spec.log",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -27,8 +27,8 @@ git config --global url."https://${HASHIBOT_USERNAME}:${HASHIBOT_TOKEN}@github.c
|
|||||||
gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
|
gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
|
||||||
make
|
make
|
||||||
bundle install
|
bundle install
|
||||||
gem build vagrant.gemspec
|
gem build -o /tmp/vagrant.gem vagrant.gemspec
|
||||||
gem install vagrant*.gem
|
gem install /tmp/vagrant.gem
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
@ -40,6 +40,6 @@ pushd vagrant-spec
|
|||||||
# necessary. Once this branch lands we can remove this line and build from main.
|
# necessary. Once this branch lands we can remove this line and build from main.
|
||||||
git checkout vagrant-ruby
|
git checkout vagrant-ruby
|
||||||
|
|
||||||
gem build vagrant-spec.gemspec
|
gem build -o /tmp/vagrant-spec.gem vagrant-spec.gemspec
|
||||||
gem install vagrant-spec*.gem
|
gem install /tmp/vagrant-spec.gem
|
||||||
popd
|
popd
|
||||||
|
|||||||
@ -1,7 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -x
|
|
||||||
|
|
||||||
export VAGRANT_SPEC_DOCKER_IMAGE="${VAGRANT_SPEC_DOCKER_IMAGE}"
|
export VAGRANT_SPEC_DOCKER_IMAGE="${VAGRANT_SPEC_DOCKER_IMAGE}"
|
||||||
|
|
||||||
|
# Explicitly use Go binary
|
||||||
|
export VAGRANT_PATH=/vagrant/vagrant
|
||||||
|
|
||||||
|
# Explicitly set high open file limits... vagrant-ruby tends to run into the
|
||||||
|
# default 1024 limit during some operations.
|
||||||
|
ulimit -n 65535
|
||||||
|
|
||||||
vagrant-spec ${VAGRANT_SPEC_ARGS} --config /vagrant/test/vagrant-spec/configs/vagrant-spec.config.docker.rb
|
vagrant-spec ${VAGRANT_SPEC_ARGS} --config /vagrant/test/vagrant-spec/configs/vagrant-spec.config.docker.rb
|
||||||
result=$?
|
result=$?
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -x
|
|
||||||
|
|
||||||
export VAGRANT_EXPERIMENTAL="${VAGRANT_EXPERIMENTAL:-1}"
|
export VAGRANT_EXPERIMENTAL="${VAGRANT_EXPERIMENTAL:-1}"
|
||||||
export VAGRANT_SPEC_BOX="${VAGRANT_SPEC_BOX}"
|
export VAGRANT_SPEC_BOX="${VAGRANT_SPEC_BOX}"
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -xe
|
set -e
|
||||||
|
|
||||||
apt-get update
|
apt-get update -q
|
||||||
apt-get install -qq -y --force-yes curl apt-transport-https
|
apt-get install -qq -y --force-yes curl apt-transport-https
|
||||||
apt-get purge -qq -y lxc-docker* || true
|
apt-get purge -qq -y lxc-docker* || true
|
||||||
curl -sSL https://get.docker.com/ | sh
|
curl -sSL https://get.docker.com/ | sh
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user