deploy-context 0.11.4 → 0.11.22
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
- checksums.yaml.gz.sig +0 -0
- data/features/deploy-context.feature +17 -3
- data/features/step_definitions/deploy-context.rb +47 -0
- data/features/support/env.rb +7 -0
- data/lib/deploy-context/deploy/cucumber.rb +1 -1
- data/lib/deploy-context/deploy/ruby.rb +8 -4
- data/lib/deploy-context/deploy.rb +9 -2
- data/lib/deploy-context.rb +8 -5
- data.tar.gz.sig +0 -0
- metadata +2 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f324cf5bf56975ef24bb1c2fabfe6f9711d4f0e048e90d05ff9c45a9f3b9502d
|
4
|
+
data.tar.gz: 0bf04e8dbafaac9c36e6239059898ea60bb33b7a414ca079eab6a0ad059586ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c42e25f31f13a73318349f90117057c1ea795fb7f22f99eecb474ef4939364afe9e55a2dfee3e6d5a3f926546659b5b2885e87afe8db85111a8b61c40d2a4be
|
7
|
+
data.tar.gz: f0e9b12d6c7d7193f3a2bd74ffb3ec18e1391aeaeb6d0c33d945d48848908557231fb82008befe54ce58065d2e7095a08815c048d16a8a44272ad9ebf91ec909
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -1,8 +1,22 @@
|
|
1
1
|
# language: fr
|
2
|
-
@fr @
|
2
|
+
@fr @deploycontext
|
3
3
|
Fonctionnalité: Je suis le testeur du déployeur de deploy-context
|
4
4
|
|
5
5
|
Scénario: Initialisé deploy-context
|
6
|
-
Étant donné que deploy-context est
|
6
|
+
Étant donné que deploy-context est absent localement
|
7
|
+
Alors cloner le projet git@github.com:JimboDragonGit/deploy-context.git
|
8
|
+
|
9
|
+
Scénario: Relâcher deploy-context
|
10
|
+
Étant donné que deploy-context est présent localement
|
7
11
|
Alors compiler deploy-context
|
8
|
-
Et publié deploy-context
|
12
|
+
Et publié deploy-context
|
13
|
+
|
14
|
+
Scénario: Tester deploy-context
|
15
|
+
Étant donné que deploy-context est présent au public
|
16
|
+
Alors installer deploy-context
|
17
|
+
Et tester deploy-context
|
18
|
+
|
19
|
+
Scénario: Bump deploy-context
|
20
|
+
Étant donné que deploy-context est tester avec succès
|
21
|
+
Alors installer deploy-context
|
22
|
+
Et tester deploy-context
|
@@ -0,0 +1,47 @@
|
|
1
|
+
Étantdonnéque('deploy-context est présent localement') do
|
2
|
+
end
|
3
|
+
|
4
|
+
Étantdonnéque('deploy-context est présent au public') do
|
5
|
+
end
|
6
|
+
|
7
|
+
Étantdonnéque('deploy-context est tester avec succès') do
|
8
|
+
end
|
9
|
+
|
10
|
+
Alors('compiler deploy-context') do
|
11
|
+
deployer.build
|
12
|
+
end
|
13
|
+
|
14
|
+
Alors('publié deploy-context') do
|
15
|
+
deployer.commit
|
16
|
+
deployer.patch_bump
|
17
|
+
deployer.release
|
18
|
+
end
|
19
|
+
|
20
|
+
Alors('attendre que deploy-context soit disponible au public') do
|
21
|
+
deployer.wait_release_available
|
22
|
+
puts "Waiting a minute before installing"
|
23
|
+
sleep(60)
|
24
|
+
end
|
25
|
+
|
26
|
+
Alors('installer deploy-context') do
|
27
|
+
deployer.install
|
28
|
+
end
|
29
|
+
|
30
|
+
Alors('tester deploy-context') do
|
31
|
+
if deployer.test_context_successful?
|
32
|
+
puts "newer version installed successfully for #{deployer.context_name} and version #{GVB.version}"
|
33
|
+
deployer.patch_bump
|
34
|
+
# patch_reset(context)
|
35
|
+
else
|
36
|
+
puts "newer version not installed for #{deployer.context_name} and version #{GVB.version}"
|
37
|
+
exit 1
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
Étantdonnéque('deploy-context est absent localement') do
|
42
|
+
deployer.clean if deployer.present_localy?
|
43
|
+
end
|
44
|
+
|
45
|
+
Alors('cloner le projet git@github.com:JimboDragonGit\/deploy-context.git') do
|
46
|
+
deployer.clean if deployer.present_localy?
|
47
|
+
end
|
data/features/support/env.rb
CHANGED
@@ -4,7 +4,7 @@ module Context
|
|
4
4
|
git_build(context)
|
5
5
|
Dir.chdir context.context_folder
|
6
6
|
puts "Working in folder #{Dir.pwd}\nAnd context #{context.context_name} is created"
|
7
|
-
|
7
|
+
check_folder get_context_folder(context, 'build')
|
8
8
|
end
|
9
9
|
|
10
10
|
def ruby_release(context)
|
@@ -32,14 +32,18 @@ module Context
|
|
32
32
|
clean_folder(context, 'pkg')
|
33
33
|
end
|
34
34
|
|
35
|
+
def ruby_check_if_available_public(context)
|
36
|
+
puts "Waiting a minute before installing"
|
37
|
+
sleep(60)
|
38
|
+
end
|
39
|
+
|
35
40
|
def ruby_cycle(context)
|
36
41
|
context.clean
|
37
42
|
context.build
|
38
43
|
context.commit
|
39
44
|
context.patch_bump
|
40
|
-
context.release
|
41
|
-
|
42
|
-
sleep(60)
|
45
|
+
context.release
|
46
|
+
context.wait_release_available
|
43
47
|
context.install
|
44
48
|
if context.test_context_successful?
|
45
49
|
puts "newer version installed successfully for #{context_name} and version #{GVB.version}"
|
@@ -10,12 +10,19 @@ module Context
|
|
10
10
|
def initialize(context_name, deploycontext_folder)
|
11
11
|
@context_name = context_name
|
12
12
|
@context_folder = deploycontext_folder
|
13
|
+
end
|
13
14
|
|
14
|
-
|
15
|
+
def present_localy?
|
16
|
+
Dir.exist?(context_folder)
|
15
17
|
end
|
16
18
|
|
17
19
|
def check_folder(folder)
|
18
|
-
FileUtils.mkdir_p(context_folder) unless
|
20
|
+
FileUtils.mkdir_p(context_folder) unless present_localy?
|
21
|
+
end
|
22
|
+
|
23
|
+
def version
|
24
|
+
Dir.chdir(deploycontext_folder)
|
25
|
+
GVB.version
|
19
26
|
end
|
20
27
|
end
|
21
28
|
end
|
data/lib/deploy-context.rb
CHANGED
@@ -23,10 +23,12 @@ module Context
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def test_context_successful?
|
26
|
+
puts "Check if deploy-context is install #{GVB.major_version}.#{GVB.minor_version}"
|
26
27
|
deploy_context_installed = `chef exec gem list deploy-context --local -i --version #{GVB.major_version}.#{GVB.minor_version}`.strip
|
28
|
+
puts "deploy_context_installed = #{deploy_context_installed}"
|
27
29
|
case deploy_context_installed
|
28
30
|
when 'true'
|
29
|
-
|
31
|
+
cucumber_build(self)
|
30
32
|
when 'false'
|
31
33
|
puts "Test context has failed"
|
32
34
|
false
|
@@ -37,11 +39,8 @@ module Context
|
|
37
39
|
end
|
38
40
|
|
39
41
|
def build
|
40
|
-
git_build(self)
|
41
|
-
check_folder get_context_folder(self, 'build')
|
42
|
-
check_folder get_context_folder(self, 'contexts')
|
43
|
-
cucumber_build(self)
|
44
42
|
ruby_build(self)
|
43
|
+
check_folder get_context_folder(self, 'contexts')
|
45
44
|
end
|
46
45
|
|
47
46
|
def commit
|
@@ -73,5 +72,9 @@ module Context
|
|
73
72
|
def major_bump
|
74
73
|
git_bump(self, 'major')
|
75
74
|
end
|
75
|
+
|
76
|
+
def wait_until_release_available
|
77
|
+
wait_until_release_available unless ruby_check_if_available_public(self)
|
78
|
+
end
|
76
79
|
end
|
77
80
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deploy-context
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Provencher
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- bin/deploy-context
|
99
99
|
- deploy-context.gemspec
|
100
100
|
- features/deploy-context.feature
|
101
|
+
- features/step_definitions/deploy-context.rb
|
101
102
|
- features/support/env.rb
|
102
103
|
- lib/deploy-context.rb
|
103
104
|
- lib/deploy-context/context/deploy.rb
|
metadata.gz.sig
CHANGED
Binary file
|