vagrant-gpii-ci 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/README.md +17 -12
- data/lib/vagrant-gpii-ci/action/build_vagrantfile.rb +8 -8
- data/lib/vagrant-gpii-ci/version.rb +1 -1
- data/samples/README.md +1 -1
- data/samples/gpii-linux/{.gpii-ci.yml → .vagrant.yml} +1 -1
- data/samples/gpii-nexus/{.gpii-ci.yml → .vagrant.yml} +1 -1
- data/samples/gpii-universal/{.gpii-ci.yml → .vagrant.yml} +1 -1
- data/samples/gpii-windows/{.gpii-ci.yml → .vagrant.yml} +1 -1
- data/vagrant.yml.template +11 -7
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ead4ebac9eec7755a365a31567d9ea1659dd5250
|
4
|
+
data.tar.gz: bff7ccfe0cc07222338109b9a2906c99cedd50ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2829431a1cd4d5af2abe49ab7c34982963b87d7ac18ffe11d4d2d8acd04119f523e448f642da16f93362f3a72d9b1320bf110fbd8ea8dba7ab5b59b1200ed0cf
|
7
|
+
data.tar.gz: e113e35750a144a4725c2ea9ebf2b77df997d5a00f754ccece08655b2cb62a682d91852ec25aee4106f43b66213b5b0eac0eaaaf0530e9682c1c21f635127736
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Vagrant-GPII-CI
|
2
|
-
|
2
|
+
===============
|
3
3
|
|
4
4
|
Scope
|
5
5
|
-----
|
@@ -15,6 +15,11 @@ The installation is as simple as run this command in your user's shell:
|
|
15
15
|
vagrant plugin install vagrant-gpii-ci
|
16
16
|
```
|
17
17
|
|
18
|
+
The recommended dependencies are:
|
19
|
+
|
20
|
+
* Virtualbox 5.1.14 or 5.0.32
|
21
|
+
* Vagrant 1.9.2
|
22
|
+
|
18
23
|
Working with vms
|
19
24
|
----------------
|
20
25
|
|
@@ -24,11 +29,11 @@ The name of the file can be override using the environment variable `VAGRANT_CI_
|
|
24
29
|
|
25
30
|
Commands:
|
26
31
|
|
27
|
-
* `vagrant up [vm]` to spin up the vms defined in the
|
32
|
+
* `vagrant up [vm]` to spin up the vms defined in the `env` variable.
|
28
33
|
* `vagrant destroy [vm]` to stop and destroy the vm.
|
29
34
|
* `vagrant reload [vm]` to stop and destroy the vm.
|
30
35
|
* `vagrant halt [vm]` to shutdown the vm without destroy it.
|
31
|
-
* `vagrant ci test [vm]` to run all the stages defined in the
|
36
|
+
* `vagrant ci test [--stage STAGE] [vm]` to run all the stages defined in the `stages` variable, at the selected vm. If the `--stage` option is used, Vagrant will only run the stage spcified.
|
32
37
|
|
33
38
|
Note:
|
34
39
|
|
@@ -38,7 +43,7 @@ Note:
|
|
38
43
|
Virtual Machines definition
|
39
44
|
---------------------------
|
40
45
|
|
41
|
-
The
|
46
|
+
The `env` variable must have a child variable called `vms` that lists the names of the virtual machines defined. Each name of a VM must have some additional options.
|
42
47
|
|
43
48
|
The options available for a vm definition are:
|
44
49
|
|
@@ -51,11 +56,11 @@ The options available for a vm definition are:
|
|
51
56
|
* `sound` - Enables a dummy sound card in the VM. Disabled by default
|
52
57
|
* `gui` - Enable the GUI of the VM. _True_ by default.
|
53
58
|
|
54
|
-
Samples
|
55
|
-
|
59
|
+
### Samples
|
60
|
+
|
56
61
|
|
57
62
|
```
|
58
|
-
|
63
|
+
env:
|
59
64
|
vms:
|
60
65
|
windows10:
|
61
66
|
cpu: 2
|
@@ -68,7 +73,7 @@ Samples
|
|
68
73
|
In the following example we use the [merge](http://yaml.org/type/merge.html) feature of YAML to simplify the virtual machines definitions.
|
69
74
|
|
70
75
|
```
|
71
|
-
|
76
|
+
env:
|
72
77
|
default: &default
|
73
78
|
cpu: 2 # number of cpus
|
74
79
|
memory: 2048 # amount of RAM memory
|
@@ -111,11 +116,11 @@ Tags
|
|
111
116
|
|
112
117
|
The tags can be used to run specific stages in some VMs. A stage with a set of tags will be only executed in the VMs that have those tags listed. If a stage doesn't have tags defined it will be executed in all VMs.
|
113
118
|
|
114
|
-
Sample
|
115
|
-
|
119
|
+
### Sample
|
120
|
+
|
116
121
|
|
117
122
|
```
|
118
|
-
|
123
|
+
env:
|
119
124
|
default: &default
|
120
125
|
cpu: 2 # number of cpus
|
121
126
|
memory: 2048 # amount of RAM memory
|
@@ -133,7 +138,7 @@ Sample
|
|
133
138
|
- linux
|
134
139
|
box: inclusivedesign/fedora
|
135
140
|
|
136
|
-
|
141
|
+
stages: # Stages to perform when 'ci test' command is invoked
|
137
142
|
- setup_win
|
138
143
|
- setup_linux
|
139
144
|
- test
|
@@ -54,18 +54,18 @@ module VagrantPlugins
|
|
54
54
|
|
55
55
|
def get_ci_tests(definition)
|
56
56
|
ci_tests = {}
|
57
|
-
if not definition.include?("
|
58
|
-
puts "WARNING:
|
57
|
+
if not definition.include?("env")
|
58
|
+
puts "WARNING: env not declared in the definition file"
|
59
59
|
return ci_tests
|
60
|
-
elsif not definition.include?("
|
61
|
-
puts "WARNING:
|
60
|
+
elsif not definition.include?("stages")
|
61
|
+
puts "WARNING: stages not declared in the definition file"
|
62
62
|
return ci_tests
|
63
63
|
end
|
64
|
-
definition["
|
64
|
+
definition["env"]["vms"].each do | vmname, vmdetails |
|
65
65
|
|
66
66
|
ci_tests["#{vmname}"] = {}
|
67
67
|
ci_tests["#{vmname}"]["shell"] = {}
|
68
|
-
definition["
|
68
|
+
definition["stages"].each do |stage|
|
69
69
|
definition.each do |stagename, stagecontent|
|
70
70
|
# Ignore the statements that start with a dot
|
71
71
|
next if stagename.start_with?(".") or stagename.eql?("stages") or not stagecontent["stage"].eql?(stage)
|
@@ -104,10 +104,10 @@ module VagrantPlugins
|
|
104
104
|
ci_environment_vms
|
105
105
|
end
|
106
106
|
def get_ci_environment(definition)
|
107
|
-
if not definition.include?("
|
107
|
+
if not definition.include?("env")
|
108
108
|
return {}
|
109
109
|
end
|
110
|
-
ci_environment_vms = inject_private_network_config(definition["
|
110
|
+
ci_environment_vms = inject_private_network_config(definition["env"]["vms"])
|
111
111
|
#TODO: load additional yaml files to extend the definition of the vms
|
112
112
|
end
|
113
113
|
|
data/samples/README.md
CHANGED
data/vagrant.yml.template
CHANGED
@@ -1,13 +1,10 @@
|
|
1
1
|
---
|
2
2
|
|
3
|
-
# The
|
4
|
-
# but they are used by the vagrant-gpii-ci plugin
|
5
|
-
#
|
6
|
-
# .ci_env variable defines the settings of each VM. The common variables are in
|
3
|
+
# The env variable defines the settings of each VM. The common variables are in
|
7
4
|
# the section 'default' which will be reference later in each VM definition.
|
8
5
|
|
9
|
-
|
10
|
-
default: &default
|
6
|
+
env:
|
7
|
+
default: &default # 'default' will be merged below
|
11
8
|
cpu: 2 # number of cpus
|
12
9
|
memory: 2048 # amount of RAM memory
|
13
10
|
clone: true # use the linked_clone Vagrant feature
|
@@ -23,7 +20,14 @@
|
|
23
20
|
<<: *default # referece of the common part
|
24
21
|
box: inclusivedesign/windows7-eval-x64
|
25
22
|
|
26
|
-
|
23
|
+
# The following part defines the commands that will be executed in the VM
|
24
|
+
# all the commands are executed by default in the /vagrant or c:\vagrant
|
25
|
+
# directory.
|
26
|
+
#
|
27
|
+
# In this case we use two stages called "setup" and "test" to define the
|
28
|
+
# provision scripts and the testing scripts
|
29
|
+
|
30
|
+
stages: # Ordered stages to execute when 'ci test' command is invoked
|
27
31
|
- setup # name of the first stage to execute
|
28
32
|
- test # name of the second stage to execute
|
29
33
|
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alfredo Matas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -83,10 +83,10 @@ files:
|
|
83
83
|
- lib/vagrant-gpii-ci/plugin.rb
|
84
84
|
- lib/vagrant-gpii-ci/version.rb
|
85
85
|
- samples/README.md
|
86
|
-
- samples/gpii-linux/.
|
87
|
-
- samples/gpii-nexus/.
|
88
|
-
- samples/gpii-universal/.
|
89
|
-
- samples/gpii-windows/.
|
86
|
+
- samples/gpii-linux/.vagrant.yml
|
87
|
+
- samples/gpii-nexus/.vagrant.yml
|
88
|
+
- samples/gpii-universal/.vagrant.yml
|
89
|
+
- samples/gpii-windows/.vagrant.yml
|
90
90
|
- spec/spec_helper.rb
|
91
91
|
- spec/vagrant/gpiici_spec.rb
|
92
92
|
- vagrant-gpiici.gemspec
|