-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- remove cucumber/aruba tests (they were fragile) - remove vagrant-in-vagrant tests (they were fragile) - add build.sh script for building (uses buildah)
- Loading branch information
Showing
16 changed files
with
82 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
Vagrant.configure(2) do |config| | ||
|
||
config.ssh.insert_key = 'true' | ||
config.vm.synced_folder "/guests/sharedfolder", "/sharedfolder", type: "sshfs" | ||
|
||
config.vm.provider :libvirt do |domain| | ||
domain.memory = 4096 | ||
domain.cpus = 4 | ||
domain.nested = true | ||
end | ||
|
||
host = 'vagrant-sshfs-builder' | ||
box = 'fedora/28-cloud-base' | ||
|
||
config.vm.define host do | tmp | | ||
tmp.vm.hostname = host | ||
tmp.vm.box = box | ||
end | ||
config.vm.provision "shell", inline: <<-SHELL | ||
dnf update -y | ||
dnf install -y buildah | ||
cd /sharedfolder/code/github.com/dustymabe/vagrant-sshfs | ||
./build.sh | ||
SHELL | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash -x | ||
set -ex | ||
|
||
ctr=$(buildah from registry.fedoraproject.org/fedora:28) | ||
|
||
rpms=( | ||
make gcc ruby ruby-devel redhat-rpm-config # for building gems | ||
gcc-c++ # for building unf_ext | ||
libvirt-devel # for building ruby-libvirt gem | ||
zlib-devel # for building nokogiri gem | ||
git # for the git ls-files in gemspec file | ||
bsdtar # used by vagrant to unpack box files | ||
) | ||
|
||
WORKINGDIR='/tmp/workingdir/' | ||
|
||
# Set working directory | ||
buildah config --workingdir $WORKINGDIR $ctr | ||
|
||
# Get all updates and install needed rpms | ||
buildah run $ctr -- dnf update -y | ||
buildah run $ctr -- dnf install -y ${rpms[@]} | ||
|
||
# Add source code | ||
buildah add $ctr './' $WORKINGDIR | ||
|
||
# Install bundler | ||
# [1] when running with bundler 1.13.2 I had to comment out | ||
# the vagrant-sshfs line in Gemfile because it errored out | ||
# complaining about it being defined twice. Running with | ||
# 1.12.5 works fine. | ||
# [2] because of [1] need to add `--version 1.12.5` | ||
buildah run $ctr -- gem install bundler --version 1.12.5 | ||
|
||
# Install all needed gems | ||
buildah run $ctr -- bundle install --with plugins | ||
|
||
# Install all needed gems | ||
buildah run $ctr -- bundle exec rake build | ||
|
||
# Copy built files outside of container | ||
mount=$(buildah mount $ctr) | ||
package=$(ls $mount/$WORKINGDIR/pkg/vagrant-sshfs-*gem) | ||
echo "copying to ./$(basename $package)" | ||
cp $package ./ | ||
buildah umount $ctr | ||
|
||
echo "Built package is at ./$(basename $package)" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters