Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos
Commits
3f37cbc7
Commit
3f37cbc7
authored
Feb 21, 2022
by
Thomas Leymonerie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos : Recipe test egg
parent
15562f41
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
136 additions
and
3 deletions
+136
-3
magic.mgc
magic.mgc
+0
-0
setup.py
setup.py
+2
-1
slapos/recipe/test_recipe.py
slapos/recipe/test_recipe.py
+75
-0
software/django/software.cfg
software/django/software.cfg
+3
-1
software/test-r/buildout.hash.cfg
software/test-r/buildout.hash.cfg
+3
-0
software/test-r/instance.cfg.in
software/test-r/instance.cfg.in
+17
-0
software/test-r/software.cfg
software/test-r/software.cfg
+33
-0
software/theia/instance-theia.cfg.jinja.in
software/theia/instance-theia.cfg.jinja.in
+1
-0
stack/slapos.cfg
stack/slapos.cfg
+2
-1
No files found.
magic.mgc
0 → 100644
View file @
3f37cbc7
File added
setup.py
View file @
3f37cbc7
...
@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
...
@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import
glob
import
glob
import
os
import
os
version
=
'1.0.226'
version
=
'1.0.226
+tleymone2
'
name
=
'slapos.cookbook'
name
=
'slapos.cookbook'
long_description
=
open
(
"README.rst"
).
read
()
long_description
=
open
(
"README.rst"
).
read
()
...
@@ -163,6 +163,7 @@ setup(name=name,
...
@@ -163,6 +163,7 @@ setup(name=name,
'symbolic.link = slapos.recipe.symbolic_link:Recipe'
,
'symbolic.link = slapos.recipe.symbolic_link:Recipe'
,
'tidstorage = slapos.recipe.tidstorage:Recipe'
,
'tidstorage = slapos.recipe.tidstorage:Recipe'
,
'trac = slapos.recipe.trac:Recipe'
,
'trac = slapos.recipe.trac:Recipe'
,
'test_recipe = slapos.recipe.test_recipe:Recipe'
,
'urlparse = slapos.recipe._urlparse:Recipe'
,
'urlparse = slapos.recipe._urlparse:Recipe'
,
'uuid = slapos.recipe._uuid:Recipe'
,
'uuid = slapos.recipe._uuid:Recipe'
,
'userinfo = slapos.recipe.userinfo:Recipe'
,
'userinfo = slapos.recipe.userinfo:Recipe'
,
...
...
slapos/recipe/test_recipe.py
0 → 100644
View file @
3f37cbc7
import
os
from
slapos.recipe.librecipe
import
GenericBaseRecipe
import
slapos.slap
import
subprocess
class
Recipe
(
GenericBaseRecipe
):
_WORKING_SET_CACHE_NAME
=
"slapos.cookbook_pplugin_ws_cache"
def
__init__
(
self
,
buildout
,
name
,
options
):
options
[
'path'
]
=
os
.
path
.
join
(
buildout
[
'buildout'
][
'parts-directory'
],
name
,
)
self
.
options
=
options
self
.
buildout
=
buildout
buildout_section
=
buildout
[
'buildout'
]
options
[
'eggs-directory'
]
=
buildout_section
[
'eggs-directory'
]
options
[
'develop-eggs-directory'
]
=
buildout_section
[
'develop-eggs-directory'
]
def
_get_cache_storage
(
self
):
"""Return a mapping where to store generated working sets.
from https://github.com/buildout/buildout/blob/master/zc.recipe.egg_/src/zc/recipe/egg/egg.py#L170
"""
try
:
return
getattr
(
self
.
buildout
,
self
.
_WORKING_SET_CACHE_NAME
)
except
AttributeError
:
cache_storage
=
{}
try
:
setattr
(
self
.
buildout
,
self
.
_WORKING_SET_CACHE_NAME
,
cache_storage
)
except
AttributeError
:
if
not
isinstance
(
self
.
buildout
,
dict
):
raise
# failed to set attribute in test mode, cache not used
return
cache_storage
def
install
(
self
):
'''self.options.created(self.options['path'])
with open(self.options['path'], 'w') as f:
f.write(self.options['contents'])
return self.options.created()'''
develop_eggs_dir
=
self
.
options
[
'develop-eggs-directory'
]
eggs_dir
=
self
.
options
[
'eggs-directory'
]
egg_list
=
tuple
(
egg
.
strip
()
for
egg
in
self
.
options
[
'eggs'
].
splitlines
()
if
egg
.
strip
()
)
cache_storage
=
self
.
_get_cache_storage
()
cache_key
=
(
egg_list
,
eggs_dir
,
develop_eggs_dir
,
)
try
:
working_set
=
cache_storage
[
cache_key
]
except
KeyError
:
if
develop_eggs_dir
and
eggs_dir
:
working_set
=
zc
.
buildout
.
easy_install
.
working_set
(
egg_list
,
[
develop_eggs_dir
,
eggs_dir
]
)
cache_storage
[
cache_key
]
=
working_set
else
:
working_set
=
set
()
test
=
pformat
(
tuple
(
dist
.
location
for
dist
in
working_set
),
indent
=
2
)
print
(
"/
\
---------/
\
"
)
self
.
options
[
'test'
]
=
"test"
print
(
self
.
options
)
print
(
"/
\
---------/
\
"
)
update
=
install
\ No newline at end of file
software/django/software.cfg
View file @
3f37cbc7
...
@@ -26,7 +26,9 @@ context =
...
@@ -26,7 +26,9 @@ context =
raw django_interpreter ${buildout:bin-directory}/${django:interpreter}
raw django_interpreter ${buildout:bin-directory}/${django:interpreter}
[versions]
[versions]
Django = 3.2.12
#Django = 3.2.12
Django = 3.2.3
sqlparse = 0.4.2
sqlparse = 0.4.2
asgiref = 3.5.0
asgiref = 3.5.0
typing-extensions = 3.7.2
typing-extensions = 3.7.2
django-cors-headers = 3.11.0
software/test-r/buildout.hash.cfg
0 → 100644
View file @
3f37cbc7
[instance]
filename = instance.cfg.in
md5sum = ed701a06948e749b3e5ad312c8989e93
software/test-r/instance.cfg.in
0 → 100644
View file @
3f37cbc7
[buildout]
parts =
test_recipe
eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
[test_recipe]
recipe = slapos.cookbook:test_recipe
port = 8080
eggs = {{ django['eggs'] }}
contents =
<zeo>
address ${:port}
</zeo>
<mappingstorage>
</mappingstorage>
software/test-r/software.cfg
0 → 100644
View file @
3f37cbc7
[buildout]
extends =
../../stack/slapos.cfg
buildout.hash.cfg
parts =
slapos-cookbook
instance
django
[python]
part = python3
[django]
recipe = zc.recipe.egg
eggs =
Django
[instance]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename}
context =
section buildout buildout
section django django
[versions]
Django = 3.2.12
sqlparse = 0.4.2
asgiref = 3.5.0
typing-extensions = 3.7.2
django-cors-headers = 3.11.0
software/theia/instance-theia.cfg.jinja.in
View file @
3f37cbc7
...
@@ -37,6 +37,7 @@ additional-url = $${remote-additional-frontend:connection-secure_access}
...
@@ -37,6 +37,7 @@ additional-url = $${remote-additional-frontend:connection-secure_access}
username = $${frontend-instance-password:username}
username = $${frontend-instance-password:username}
password = $${frontend-instance-password:passwd}
password = $${frontend-instance-password:passwd}
backend-url = $${frontend-instance:url}
backend-url = $${frontend-instance:url}
ipv6 = {{ ipv6_random }}
[directory]
[directory]
...
...
stack/slapos.cfg
View file @
3f37cbc7
...
@@ -39,6 +39,7 @@ exec-sitecustomize = false
...
@@ -39,6 +39,7 @@ exec-sitecustomize = false
find-links +=
find-links +=
http://www.nexedi.org/static/packages/source/
http://www.nexedi.org/static/packages/source/
http://www.nexedi.org/static/packages/source/slapos.buildout/
http://www.nexedi.org/static/packages/source/slapos.buildout/
/srv/slapgrid/slappart28/srv/project/slapos/dist/
# Use only quite well working sites.
# Use only quite well working sites.
allow-hosts +=
allow-hosts +=
...
@@ -189,7 +190,7 @@ setproctitle = 1.1.10
...
@@ -189,7 +190,7 @@ setproctitle = 1.1.10
setuptools-dso = 1.7
setuptools-dso = 1.7
rubygemsrecipe = 0.4.3
rubygemsrecipe = 0.4.3
six = 1.12.0
six = 1.12.0
slapos.cookbook = 1.0.226
slapos.cookbook = 1.0.226
+tleymone2
slapos.core = 1.7.2
slapos.core = 1.7.2
slapos.extension.strip = 0.4
slapos.extension.strip = 0.4
slapos.extension.shared = 1.0
slapos.extension.shared = 1.0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment