vagrant-gpii-ci 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f4961a92e8881a6fbf78ca95adb2de0263288b3
4
- data.tar.gz: 14235567b7194116ca55a46dc46cb43f6373432d
3
+ metadata.gz: ead4ebac9eec7755a365a31567d9ea1659dd5250
4
+ data.tar.gz: bff7ccfe0cc07222338109b9a2906c99cedd50ad
5
5
  SHA512:
6
- metadata.gz: 94d6fd40f82dbda8c84d7e769ba6d02fba62ee6a3bb18e401499b076b925859ace03cd72992a6c78764f49b646c89889f311c39eacaf93a2ef83d29b5b49f92e
7
- data.tar.gz: 56046a9a44230f405ca79893e8ca66d06ae7ed77d82bf323e574624d33af2c6cf6f1bef3388c8ccc989781d24b11fcfc8c094bb34ffe881c27440ab2c999a88a
6
+ metadata.gz: 2829431a1cd4d5af2abe49ab7c34982963b87d7ac18ffe11d4d2d8acd04119f523e448f642da16f93362f3a72d9b1320bf110fbd8ea8dba7ab5b59b1200ed0cf
7
+ data.tar.gz: e113e35750a144a4725c2ea9ebf2b77df997d5a00f754ccece08655b2cb62a682d91852ec25aee4106f43b66213b5b0eac0eaaaf0530e9682c1c21f635127736
data/.gitignore CHANGED
@@ -8,3 +8,6 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  .vagrant
11
+ .gitlab-ci.yml
12
+ .vagrant.yml
13
+ Vagrantfile
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 .ci_env variable.
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 .ci_stages variable, at the selected vm.
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 `.ci_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.
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
- .ci_env:
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
- .ci_env:
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
- .ci_env:
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
- .ci_stages: # Stages to perform when 'ci test' command is invoked
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?(".ci_env")
58
- puts "WARNING: .ci_env not declared in the definition file"
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?(".ci_stages")
61
- puts "WARNING: .ci_stages not declared in the definition file"
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[".ci_env"]["vms"].each do | vmname, vmdetails |
64
+ definition["env"]["vms"].each do | vmname, vmdetails |
65
65
 
66
66
  ci_tests["#{vmname}"] = {}
67
67
  ci_tests["#{vmname}"]["shell"] = {}
68
- definition[".ci_stages"].each do |stage|
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?(".ci_env")
107
+ if not definition.include?("env")
108
108
  return {}
109
109
  end
110
- ci_environment_vms = inject_private_network_config(definition[".ci_env"]["vms"])
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
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module GPIICi
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
data/samples/README.md CHANGED
@@ -9,4 +9,4 @@ run any of these examples:
9
9
  2. Install the plugin
10
10
  `vagrant plugin install vagrant-gpii-ci`
11
11
  3. Run vagrant:
12
- `vagrant up && vagrant test`
12
+ `vagrant up && vagrant ci test`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
 
3
- .ci_env:
3
+ env:
4
4
  vms:
5
5
  fedora:
6
6
  cpu: 2 # number of cpus
@@ -1,6 +1,6 @@
1
1
  ---
2
2
 
3
- .ci_env:
3
+ env:
4
4
  vms:
5
5
  fedora:
6
6
  cpu: 2 # number of cpus
@@ -1,6 +1,6 @@
1
1
  ---
2
2
 
3
- .ci_env:
3
+ env:
4
4
  vms:
5
5
  fedora:
6
6
  cpu: 2 # number of cpus
@@ -1,6 +1,6 @@
1
1
  ---
2
2
 
3
- .ci_env:
3
+ env:
4
4
  vms:
5
5
  windows10:
6
6
  cpu: 2 # number of cpus
data/vagrant.yml.template CHANGED
@@ -1,13 +1,10 @@
1
1
  ---
2
2
 
3
- # The variables that start with a dot "." are ignored by gitlab-ci,
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
- .ci_env:
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
- .ci_stages: # Stages to perform when 'ci test' command is invoked
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.5
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-06 00:00:00.000000000 Z
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/.gpii-ci.yml
87
- - samples/gpii-nexus/.gpii-ci.yml
88
- - samples/gpii-universal/.gpii-ci.yml
89
- - samples/gpii-windows/.gpii-ci.yml
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