vagrant-gpii-ci 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +44 -62
- data/gpii-ci.yml.template +44 -0
- data/lib/vagrant-gpii-ci/action/build_vagrantfile.rb +160 -0
- data/lib/vagrant-gpii-ci/action/init_environment.rb +7 -8
- data/lib/vagrant-gpii-ci/action/update_hosts.rb +138 -0
- data/lib/vagrant-gpii-ci/action.rb +8 -101
- data/lib/vagrant-gpii-ci/command/base.rb +1 -1
- data/lib/vagrant-gpii-ci/command/ci.rb +66 -0
- data/lib/vagrant-gpii-ci/command/init.rb +2 -2
- data/lib/vagrant-gpii-ci/command/test.rb +55 -47
- data/lib/vagrant-gpii-ci/plugin.rb +19 -16
- data/lib/vagrant-gpii-ci/version.rb +2 -2
- data/lib/vagrant-gpii-ci.rb +16 -3
- data/samples/gpii-linux/.gpii-ci.yml +25 -0
- data/samples/gpii-nexus/.gpii-ci.yml +26 -0
- data/samples/gpii-universal/.gpii-ci.yml +32 -0
- data/samples/gpii-windows/.gpii-ci.yml +33 -0
- data/spec/spec_helper.rb +4 -1
- data/spec/vagrant/gpiici_spec.rb +12 -0
- data/{vagrant-cienv.gemspec → vagrant-gpiici.gemspec} +3 -3
- metadata +15 -32
- data/lib/envs/default.json +0 -20
- data/lib/envs/linux-desktop.json +0 -22
- data/lib/envs/production.yml +0 -33
- data/lib/provisioning/base-playbook.yml +0 -16
- data/lib/provisioning/couchdb-playbook.yml +0 -11
- data/lib/provisioning/couchdb-requirements.yml +0 -5
- data/lib/provisioning/couchdb-vagrant-vars.yml +0 -1
- data/lib/provisioning/gpii-linux-playbook.yml +0 -11
- data/lib/provisioning/gpii-linux-requirements.yml +0 -6
- data/lib/provisioning/gpii-linux-vagrant-vars.yml +0 -23
- data/lib/provisioning/nodejs-playbook.yml +0 -12
- data/lib/provisioning/nodejs-requirements.yml +0 -7
- data/lib/provisioning/nodejs-vagrant-vars.yml +0 -11
- data/lib/provisioning/preferences-playbook.yml +0 -13
- data/lib/provisioning/preferences-requirements.yml +0 -9
- data/lib/provisioning/preferences-vagrant-vars.yml +0 -5
- data/lib/vagrant-gpii-ci/config/config_folders.rb +0 -17
- data/lib/vagrant-gpii-ci/config/config_network.rb +0 -69
- data/lib/vagrant-gpii-ci/config/config_provider.rb +0 -40
- data/lib/vagrant-gpii-ci/config/config_provision.rb +0 -50
- data/qi.yml.template +0 -56
- data/samples/gpii-linux/.qi.yml +0 -22
- data/samples/gpii-linux-production/.qi.yml +0 -41
- data/samples/gpii-nexus/.qi.yml +0 -24
- data/samples/gpii-universal/.qi.yml +0 -27
- data/spec/vagrant/cienv_spec.rb +0 -11
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'optparse'
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module GPIICi
|
5
|
+
module Command
|
6
|
+
class Ci < Vagrant.plugin("2", :command)
|
7
|
+
def self.synopsis
|
8
|
+
"Manages QI environments"
|
9
|
+
end
|
10
|
+
|
11
|
+
def initialize(argv, env)
|
12
|
+
super
|
13
|
+
|
14
|
+
@main_args, @sub_command, @sub_args = split_main_and_subcommand(argv)
|
15
|
+
@subcommands = Vagrant::Registry.new
|
16
|
+
@subcommands.register(:init) do
|
17
|
+
require File.expand_path("../init", __FILE__)
|
18
|
+
InitEnvironment
|
19
|
+
end
|
20
|
+
@subcommands.register(:test) do
|
21
|
+
require File.expand_path("../test", __FILE__)
|
22
|
+
CITest
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def execute
|
27
|
+
if @main_args.include?("-h") || @main_args.include?("--help")
|
28
|
+
# Print the help for all the sub-commands.
|
29
|
+
puts "GPIICi plugin provides some commands that help the launch of tests automatically"
|
30
|
+
return help
|
31
|
+
end
|
32
|
+
# If we reached this far then we must have a subcommand. If not,
|
33
|
+
# then we also just print the help and exit.
|
34
|
+
command_class = @subcommands.get(@sub_command.to_sym) if @sub_command
|
35
|
+
return help if !command_class || !@sub_command
|
36
|
+
@logger.debug("Invoking command class: #{command_class} #{@sub_args.inspect}")
|
37
|
+
# Initialize and execute the command class
|
38
|
+
command_class.new(@sub_args, @env).execute
|
39
|
+
end
|
40
|
+
|
41
|
+
# Prints the help out for this command
|
42
|
+
def help
|
43
|
+
opts = OptionParser.new do |o|
|
44
|
+
o.banner = "Usage: vagrant ci [<args>]"
|
45
|
+
o.separator ""
|
46
|
+
o.separator "Available subcommands:"
|
47
|
+
|
48
|
+
# Add the available subcommands as separators in order to print them
|
49
|
+
# out as well.
|
50
|
+
keys = []
|
51
|
+
@subcommands.each { |key, value| keys << key.to_s }
|
52
|
+
|
53
|
+
keys.sort.each do |key|
|
54
|
+
o.separator " #{key}"
|
55
|
+
end
|
56
|
+
|
57
|
+
o.separator ""
|
58
|
+
o.separator "For help on any individual command run `vagrant ci <command> -h`"
|
59
|
+
end
|
60
|
+
|
61
|
+
@env.ui.info(opts.help, prefix: false)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -3,12 +3,12 @@ require 'optparse'
|
|
3
3
|
require_relative "base"
|
4
4
|
|
5
5
|
module VagrantPlugins
|
6
|
-
module
|
6
|
+
module GPIICi
|
7
7
|
module Command
|
8
8
|
class InitEnvironment < Base
|
9
9
|
def execute
|
10
10
|
opts = OptionParser.new do |o|
|
11
|
-
o.banner = "Usage: vagrant
|
11
|
+
o.banner = "Usage: vagrant ci test [-h]"
|
12
12
|
end
|
13
13
|
|
14
14
|
# Parse the options
|
@@ -1,65 +1,73 @@
|
|
1
|
-
require 'optparse'
|
2
|
-
|
3
1
|
module VagrantPlugins
|
4
|
-
module
|
5
|
-
|
6
|
-
class
|
7
|
-
def self.synopsis
|
8
|
-
"Manages QI environments"
|
9
|
-
end
|
10
|
-
|
11
|
-
def initialize(argv, env)
|
12
|
-
super
|
13
|
-
|
14
|
-
@main_args, @sub_command, @sub_args = split_main_and_subcommand(argv)
|
2
|
+
module GPIICi
|
3
|
+
module Command
|
4
|
+
class CITest < Vagrant.plugin("2", :command)
|
15
5
|
|
16
|
-
|
17
|
-
|
18
|
-
require_relative "init"
|
19
|
-
InitEnvironment
|
20
|
-
end
|
6
|
+
def self.synopsis
|
7
|
+
"Run tests on a machine"
|
21
8
|
end
|
22
9
|
|
23
10
|
def execute
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
11
|
+
param_options = {}
|
12
|
+
opts = OptionParser.new do |o|
|
13
|
+
o.banner = "Usage: vagrant ci test [options] [name|id]"
|
14
|
+
o.on("--stage STAGE", String, "Execute specific stage") do |s|
|
15
|
+
param_options[:stage] = s
|
16
|
+
end
|
28
17
|
end
|
18
|
+
argv = parse_options(opts)
|
19
|
+
return if !argv
|
29
20
|
|
30
|
-
|
31
|
-
# then we also just print the help and exit.
|
32
|
-
command_class = @subcommands.get(@sub_command.to_sym) if @sub_command
|
33
|
-
return help if !command_class || !@sub_command
|
34
|
-
@logger.debug("Invoking command class: #{command_class} #{@sub_args.inspect}")
|
21
|
+
@env.ui.info("Launching tests...")
|
35
22
|
|
36
|
-
|
37
|
-
command_class.new(@sub_args, @env).execute
|
38
|
-
end
|
23
|
+
ci_tests = @env.instance_variable_get(:@ci_tests)
|
39
24
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
25
|
+
with_target_vms(argv, single_target: true) do |machine|
|
26
|
+
if machine.config.vm.communicator == :winrm
|
27
|
+
cwd = "cd c:\\vagrant"
|
28
|
+
else
|
29
|
+
cwd = "cd /vagrant"
|
30
|
+
end
|
31
|
+
ci_tests["#{machine.config.vm.hostname}"].each do | provisioner, stages |
|
46
32
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
33
|
+
if provisioner.eql?("shell")
|
34
|
+
stages.each do |stagename, stagescripts|
|
35
|
+
next if (param_options.include?(:stage) and not stagename.eql?(param_options[:stage]))
|
36
|
+
stagescripts.each do | script |
|
51
37
|
|
52
|
-
|
53
|
-
|
54
|
-
|
38
|
+
options = {}
|
39
|
+
options[:color] = :blue
|
40
|
+
@env.ui.info("Running shell script:")
|
41
|
+
@env.ui.info("#{script}",options)
|
42
|
+
|
43
|
+
machine.communicate.execute("#{cwd}; #{script}") do |type, data|
|
44
|
+
handle_comm(type, data, machine)
|
45
|
+
end
|
55
46
|
|
56
|
-
|
57
|
-
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
58
51
|
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def handle_comm(type, data, machine)
|
55
|
+
if [:stdout,:stderr].include?(type)
|
56
|
+
# Output the data with the proper color based on the stream.
|
57
|
+
color = type == :stdout ? :green : :red
|
58
|
+
|
59
|
+
# Clear out the newline since we add one
|
60
|
+
data = data.chomp
|
59
61
|
|
60
|
-
|
62
|
+
return if data.empty?
|
63
|
+
|
64
|
+
options = {}
|
65
|
+
options[:color] = color
|
66
|
+
|
67
|
+
machine.ui.info(data, options)
|
68
|
+
end
|
61
69
|
end
|
62
70
|
end
|
63
71
|
end
|
64
72
|
end
|
65
|
-
end
|
73
|
+
end
|
@@ -1,27 +1,30 @@
|
|
1
1
|
begin
|
2
2
|
require "vagrant"
|
3
3
|
rescue LoadError
|
4
|
-
raise "The Vagrant
|
5
|
-
end
|
6
|
-
|
7
|
-
# This is a sanity check to make sure no one is attempting to install
|
8
|
-
# this into an early Vagrant version.
|
9
|
-
if Vagrant::VERSION < "1.8.0"
|
10
|
-
raise "The Vagrant QI plugin is only compatible with Vagrant 1.8+"
|
4
|
+
raise "The Vagrant GPII CI plugin must be run within Vagrant."
|
11
5
|
end
|
12
6
|
|
13
7
|
module VagrantPlugins
|
14
|
-
module
|
8
|
+
module GPIICi
|
15
9
|
class Plugin < Vagrant.plugin("2")
|
16
|
-
name "
|
17
|
-
description
|
10
|
+
name "GPIICi"
|
11
|
+
description <<-DESC
|
12
|
+
Vagrant plugin that parses a definition file in YAML to spin up
|
13
|
+
VMs to recreate an environment and run some tests.
|
14
|
+
DESC
|
18
15
|
|
19
16
|
action_hook(:build_config, :environment_load) do |hook|
|
20
|
-
hook.prepend(
|
17
|
+
hook.prepend(Action.build_vagrantfile)
|
21
18
|
end
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
|
20
|
+
# Register capability to run commmands
|
21
|
+
|
22
|
+
# Create an action_hook to run the commands at the end of the provision
|
23
|
+
|
24
|
+
# run the test jobs when "test" command is invoked using the capability
|
25
|
+
command("ci") do
|
26
|
+
require File.expand_path("../command/ci", __FILE__)
|
27
|
+
Command::Ci
|
25
28
|
end
|
26
29
|
|
27
30
|
# This sets up our log level to be whatever VAGRANT_LOG is.
|
@@ -46,7 +49,7 @@ module VagrantPlugins
|
|
46
49
|
# Set the logging level on all "vagrant" namespaced
|
47
50
|
# logs as long as we have a valid level.
|
48
51
|
if level
|
49
|
-
logger = Log4r::Logger.new("
|
52
|
+
logger = Log4r::Logger.new("vagrant_gpii_ci")
|
50
53
|
logger.outputters = Log4r::Outputter.stderr
|
51
54
|
logger.level = level
|
52
55
|
logger = nil
|
@@ -56,4 +59,4 @@ module VagrantPlugins
|
|
56
59
|
end
|
57
60
|
end
|
58
61
|
|
59
|
-
|
62
|
+
|
data/lib/vagrant-gpii-ci.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
require "pathname"
|
2
2
|
|
3
|
-
require "vagrant-gpii-ci/plugin"
|
4
|
-
|
5
3
|
module VagrantPlugins
|
6
|
-
module
|
4
|
+
module GPIICi
|
5
|
+
|
7
6
|
lib_path = Pathname.new(File.expand_path("../vagrant-gpii-ci", __FILE__))
|
8
7
|
autoload :Action, lib_path.join("action")
|
9
8
|
autoload :Errors, lib_path.join("errors")
|
@@ -16,3 +15,17 @@ module VagrantPlugins
|
|
16
15
|
end
|
17
16
|
end
|
18
17
|
end
|
18
|
+
|
19
|
+
begin
|
20
|
+
require "vagrant"
|
21
|
+
rescue LoadError
|
22
|
+
raise "The Vagrant GPII CI plugin must be run within Vagrant."
|
23
|
+
end
|
24
|
+
|
25
|
+
# This is a sanity check to make sure no one is attempting to install
|
26
|
+
# this into an early Vagrant version.
|
27
|
+
if Vagrant::VERSION < "1.8.0"
|
28
|
+
raise "The Vagrant GPII CI plugin is only compatible with Vagrant 1.8+"
|
29
|
+
end
|
30
|
+
|
31
|
+
require "vagrant-gpii-ci/plugin"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
.ci_env:
|
4
|
+
vms:
|
5
|
+
fedora:
|
6
|
+
cpu: 2 # number of cpus
|
7
|
+
memory: 2048 # amount of RAM memory
|
8
|
+
clone: true # use the linked_clone Vagrant feature
|
9
|
+
autostart: true
|
10
|
+
box: inclusivedesign/fedora24
|
11
|
+
|
12
|
+
stages: # Stages to perform when 'ci test' command is invoked
|
13
|
+
- setup # name of the first stage to execute
|
14
|
+
- test # name of the second stage to execute
|
15
|
+
|
16
|
+
setup_job:
|
17
|
+
stage: setup # name of the stage
|
18
|
+
script:
|
19
|
+
- sudo ansible-galaxy install -fr provisioning/requirements.yml
|
20
|
+
- sudo ansible-playbook provisioning/playbook.yml --extra-vars "@provisioning/vars.yml" --extra-vars "nodejs_app_install_dir=/vagrant" --tags="install,configure"
|
21
|
+
|
22
|
+
test_job:
|
23
|
+
stage: test # name of the stage
|
24
|
+
script: # One line per command to execute
|
25
|
+
- node tests/AcceptanceTests.js
|
@@ -0,0 +1,26 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
.ci_env:
|
4
|
+
vms:
|
5
|
+
fedora:
|
6
|
+
cpu: 2 # number of cpus
|
7
|
+
memory: 2048 # amount of RAM memory
|
8
|
+
clone: true # use the linked_clone Vagrant feature
|
9
|
+
autostart: true
|
10
|
+
box: inclusivedesign/fedora24
|
11
|
+
|
12
|
+
stages: # Stages to perform when 'ci test' command is invoked
|
13
|
+
- setup # name of the first stage to execute
|
14
|
+
- test # name of the second stage to execute
|
15
|
+
|
16
|
+
setup_job:
|
17
|
+
stage: setup # name of the stage
|
18
|
+
script:
|
19
|
+
- npm install
|
20
|
+
- sudo npm install -g grunt-cli node-gyp
|
21
|
+
- grunt --force build
|
22
|
+
|
23
|
+
test_job:
|
24
|
+
stage: test # name of the stage
|
25
|
+
script: # One line per command to execute
|
26
|
+
- node tests/all-tests.js
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
.ci_env:
|
4
|
+
vms:
|
5
|
+
fedora:
|
6
|
+
cpu: 2 # number of cpus
|
7
|
+
memory: 2048 # amount of RAM memory
|
8
|
+
clone: true # use the linked_clone Vagrant feature
|
9
|
+
autostart: true
|
10
|
+
box: inclusivedesign/fedora24
|
11
|
+
|
12
|
+
stages: # Stages to perform when 'ci test' command is invoked
|
13
|
+
- setup # name of the first stage to execute
|
14
|
+
- test # name of the second stage to execute
|
15
|
+
|
16
|
+
setup_job:
|
17
|
+
stage: setup # name of the stage
|
18
|
+
script:
|
19
|
+
- sudo ansible-galaxy install -fr provisioning/requirements.yml
|
20
|
+
- >
|
21
|
+
sudo UNIVERSAL_VARS_FILE=vagrant-vars.yml ansible-playbook provisioning/playbook.yml
|
22
|
+
--extra-vars "@provisioning/vars.yml"
|
23
|
+
--extra-vars "nodejs_app_install_dir=/vagrant"
|
24
|
+
--tags="install,configure"
|
25
|
+
- sudo npm install -g testem
|
26
|
+
|
27
|
+
test_job:
|
28
|
+
stage: test # name of the stage
|
29
|
+
script: # One line per command to execute
|
30
|
+
- "npm test"
|
31
|
+
- "testem ci --file tests/web/testem_qi.json"
|
32
|
+
- "node tests/ProductionConfigTests.js"
|
@@ -0,0 +1,33 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
.ci_env:
|
4
|
+
vms:
|
5
|
+
windows10:
|
6
|
+
cpu: 2 # number of cpus
|
7
|
+
memory: 2048 # amount of RAM memory
|
8
|
+
clone: true # use the linked_clone Vagrant feature
|
9
|
+
autostart: true
|
10
|
+
box: inclusivedesign/windows10-eval
|
11
|
+
|
12
|
+
stages: # Stages to perform when 'ci test' command is invoked
|
13
|
+
- setup # name of the first stage to execute
|
14
|
+
- test # name of the second stage to execute
|
15
|
+
|
16
|
+
setup_job:
|
17
|
+
stage: setup # name of the stage
|
18
|
+
script:
|
19
|
+
- |
|
20
|
+
choco upgrade firefox googlechrome -y
|
21
|
+
$moduleLocation = Join-Path $env:SystemDrive "vagrant/provisioning/Provisioning.psm1"
|
22
|
+
$destinationDir = Join-Path $env:SystemDrive "tmp"
|
23
|
+
cp $moduleLocation $destinationDir
|
24
|
+
- provisioning/Chocolatey.ps1
|
25
|
+
- provisioning/Npm.ps1
|
26
|
+
- provisioning/Build.ps1
|
27
|
+
- provisioning/Installer.ps1
|
28
|
+
|
29
|
+
test_job:
|
30
|
+
stage: test # name of the stage
|
31
|
+
script: # One line per command to execute
|
32
|
+
- do.ps1 -c 'node tests/AcceptanceTests.js builtIn'
|
33
|
+
- do.ps1 -c 'node tests/UnitTests.js'
|
data/spec/spec_helper.rb
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'vagrant-gpii-ci/action'
|
3
|
+
|
4
|
+
describe VagrantPlugins::GPIICi do
|
5
|
+
it 'has a version number' do
|
6
|
+
expect(VagrantPlugins::GPIICi::VERSION).not_to be nil
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
describe VagrantPlugins::GPIICi::Action::BuildVagrantfile do
|
11
|
+
|
12
|
+
end
|
@@ -5,12 +5,12 @@ require 'vagrant-gpii-ci/version'
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "vagrant-gpii-ci"
|
8
|
-
spec.version = VagrantPlugins::
|
8
|
+
spec.version = VagrantPlugins::GPIICi::VERSION
|
9
9
|
spec.authors = ["Alfredo Matas"]
|
10
10
|
spec.email = ["amatas@gmail.com"]
|
11
11
|
|
12
|
-
spec.summary = %q{Vagrant CI environment builder}
|
13
|
-
spec.description = %q{Vagrant CI environment builder}
|
12
|
+
spec.summary = %q{Vagrant GPII CI environment builder}
|
13
|
+
spec.description = %q{Vagrant GPII CI environment builder}
|
14
14
|
spec.homepage = "http://github.com/amatas/vagrant-gpii-ci.git"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-gpii-ci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alfredo Matas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.8.2
|
55
|
-
description: Vagrant CI environment builder
|
55
|
+
description: Vagrant GPII CI environment builder
|
56
56
|
email:
|
57
57
|
- amatas@gmail.com
|
58
58
|
executables:
|
@@ -71,43 +71,26 @@ files:
|
|
71
71
|
- Rakefile
|
72
72
|
- bin/console
|
73
73
|
- bin/setup
|
74
|
-
-
|
75
|
-
- lib/envs/linux-desktop.json
|
76
|
-
- lib/envs/production.yml
|
77
|
-
- lib/provisioning/base-playbook.yml
|
78
|
-
- lib/provisioning/couchdb-playbook.yml
|
79
|
-
- lib/provisioning/couchdb-requirements.yml
|
80
|
-
- lib/provisioning/couchdb-vagrant-vars.yml
|
81
|
-
- lib/provisioning/gpii-linux-playbook.yml
|
82
|
-
- lib/provisioning/gpii-linux-requirements.yml
|
83
|
-
- lib/provisioning/gpii-linux-vagrant-vars.yml
|
84
|
-
- lib/provisioning/nodejs-playbook.yml
|
85
|
-
- lib/provisioning/nodejs-requirements.yml
|
86
|
-
- lib/provisioning/nodejs-vagrant-vars.yml
|
87
|
-
- lib/provisioning/preferences-playbook.yml
|
88
|
-
- lib/provisioning/preferences-requirements.yml
|
89
|
-
- lib/provisioning/preferences-vagrant-vars.yml
|
74
|
+
- gpii-ci.yml.template
|
90
75
|
- lib/vagrant-gpii-ci.rb
|
91
76
|
- lib/vagrant-gpii-ci/action.rb
|
77
|
+
- lib/vagrant-gpii-ci/action/build_vagrantfile.rb
|
92
78
|
- lib/vagrant-gpii-ci/action/init_environment.rb
|
79
|
+
- lib/vagrant-gpii-ci/action/update_hosts.rb
|
93
80
|
- lib/vagrant-gpii-ci/command/base.rb
|
81
|
+
- lib/vagrant-gpii-ci/command/ci.rb
|
94
82
|
- lib/vagrant-gpii-ci/command/init.rb
|
95
83
|
- lib/vagrant-gpii-ci/command/test.rb
|
96
|
-
- lib/vagrant-gpii-ci/config/config_folders.rb
|
97
|
-
- lib/vagrant-gpii-ci/config/config_network.rb
|
98
|
-
- lib/vagrant-gpii-ci/config/config_provider.rb
|
99
|
-
- lib/vagrant-gpii-ci/config/config_provision.rb
|
100
84
|
- lib/vagrant-gpii-ci/plugin.rb
|
101
85
|
- lib/vagrant-gpii-ci/version.rb
|
102
|
-
- qi.yml.template
|
103
86
|
- samples/README.md
|
104
|
-
- samples/gpii-linux-
|
105
|
-
- samples/gpii-
|
106
|
-
- samples/gpii-
|
107
|
-
- samples/gpii-
|
87
|
+
- samples/gpii-linux/.gpii-ci.yml
|
88
|
+
- samples/gpii-nexus/.gpii-ci.yml
|
89
|
+
- samples/gpii-universal/.gpii-ci.yml
|
90
|
+
- samples/gpii-windows/.gpii-ci.yml
|
108
91
|
- spec/spec_helper.rb
|
109
|
-
- spec/vagrant/
|
110
|
-
- vagrant-
|
92
|
+
- spec/vagrant/gpiici_spec.rb
|
93
|
+
- vagrant-gpiici.gemspec
|
111
94
|
homepage: http://github.com/amatas/vagrant-gpii-ci.git
|
112
95
|
licenses:
|
113
96
|
- MIT
|
@@ -131,7 +114,7 @@ rubyforge_project:
|
|
131
114
|
rubygems_version: 2.5.2
|
132
115
|
signing_key:
|
133
116
|
specification_version: 4
|
134
|
-
summary: Vagrant CI environment builder
|
117
|
+
summary: Vagrant GPII CI environment builder
|
135
118
|
test_files:
|
136
119
|
- spec/spec_helper.rb
|
137
|
-
- spec/vagrant/
|
120
|
+
- spec/vagrant/gpiici_spec.rb
|
data/lib/envs/default.json
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"global": {
|
3
|
-
"provider": "virtualbox",
|
4
|
-
"cpu": 2,
|
5
|
-
"memory": 1024
|
6
|
-
},
|
7
|
-
"vms": {
|
8
|
-
"fedora": {
|
9
|
-
"autostart": true,
|
10
|
-
"box": "inclusivedesign/centos7",
|
11
|
-
"folders": {
|
12
|
-
"code": {
|
13
|
-
"src": ".",
|
14
|
-
"dest": "/home/vagrant/sync"
|
15
|
-
}
|
16
|
-
}
|
17
|
-
}
|
18
|
-
}
|
19
|
-
}
|
20
|
-
|
data/lib/envs/linux-desktop.json
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"global": {
|
3
|
-
"provider": "virtualbox",
|
4
|
-
"cpu": 2,
|
5
|
-
"memory": 1024
|
6
|
-
},
|
7
|
-
"vms": {
|
8
|
-
"fedora": {
|
9
|
-
"autostart": true,
|
10
|
-
"box": "inclusivedesign/fedora24",
|
11
|
-
"gui": true,
|
12
|
-
"sound": true,
|
13
|
-
"folders": {
|
14
|
-
"code": {
|
15
|
-
"src": ".",
|
16
|
-
"dest": "/home/vagrant/sync"
|
17
|
-
}
|
18
|
-
}
|
19
|
-
}
|
20
|
-
}
|
21
|
-
}
|
22
|
-
|
data/lib/envs/production.yml
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
global:
|
4
|
-
provider: virtualbox
|
5
|
-
cpu: 2
|
6
|
-
memory: 1024
|
7
|
-
vms:
|
8
|
-
server:
|
9
|
-
autostart: true
|
10
|
-
box: inclusivedesign/centos7
|
11
|
-
gui: false
|
12
|
-
networks:
|
13
|
-
private:
|
14
|
-
type: private
|
15
|
-
folders:
|
16
|
-
code:
|
17
|
-
src: "."
|
18
|
-
dest: "/home/vagrant/sync/node_modules/universal"
|
19
|
-
fedora:
|
20
|
-
autostart: true
|
21
|
-
box: inclusivedesign/fedora24
|
22
|
-
gui: true
|
23
|
-
sound: true
|
24
|
-
cpu: 4
|
25
|
-
memory: 2048
|
26
|
-
networks:
|
27
|
-
private:
|
28
|
-
type: private
|
29
|
-
folders:
|
30
|
-
code:
|
31
|
-
src: "."
|
32
|
-
dest: "/home/vagrant/sync/node_modules/universal"
|
33
|
-
|
@@ -1,16 +0,0 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
- hosts: localhost
|
4
|
-
become: true
|
5
|
-
|
6
|
-
pre_tasks:
|
7
|
-
- name: Set hostname
|
8
|
-
hostname: "name={{ lookup('env', 'VM_HOSTNAME') }}"
|
9
|
-
|
10
|
-
- name: "Build hosts file"
|
11
|
-
lineinfile:
|
12
|
-
dest: /etc/hosts
|
13
|
-
line: "{{ item.key }} {{ item.value }}"
|
14
|
-
state: present
|
15
|
-
with_dict: "{{ vms_hosts|default({}) }}"
|
16
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
---
|