Remove most of gitlabci job
This commit is contained in:
parent
93de46b061
commit
3c4f5f6d7e
@ -1,3 +1,7 @@
|
||||
build:
|
||||
image: yourlabs/shlax
|
||||
script: pip install -U .[test] && py.test -svv tests
|
||||
stage: test
|
||||
pypi:
|
||||
image: yourlabs/python
|
||||
only:
|
||||
|
||||
@ -20,6 +20,10 @@ class Packages(Action):
|
||||
Packages visitor will pick it up.
|
||||
"""
|
||||
contextualize = ['mgr']
|
||||
regexps = {
|
||||
#r'Installing ([\w\d-]+)': '{cyan}\\1',
|
||||
r'Installing': '{cyan}lol',
|
||||
}
|
||||
|
||||
mgrs = dict(
|
||||
apk=dict(
|
||||
|
||||
@ -5,23 +5,8 @@ from shlax import *
|
||||
|
||||
class GitLabCIConfig(Script):
|
||||
async def call(self, *args, write=True, **kwargs):
|
||||
self.context['definition'] = kwargs
|
||||
await super().call(*args, **kwargs)
|
||||
for name, definition in self.context['definition'].items():
|
||||
self.context['definition'][name] = definition
|
||||
output = yaml.dump(self.context['definition'])
|
||||
output = yaml.dump(self.kwargs)
|
||||
self.output(output)
|
||||
if write:
|
||||
with open('.gitlab-ci.yml', 'w+') as f:
|
||||
f.write(output)
|
||||
|
||||
|
||||
class Job(Action):
|
||||
async def call(self, *args, **kwargs):
|
||||
self.context['definition'][self.args[0]] = self.kwargs
|
||||
|
||||
def output_start(self):
|
||||
pass
|
||||
|
||||
def output_success(self):
|
||||
pass
|
||||
|
||||
11
shlaxfile.py
11
shlaxfile.py
@ -4,18 +4,23 @@ from shlax.contrib.gitlab import *
|
||||
PYTEST = 'py.test -svv tests'
|
||||
|
||||
build = Buildah('alpine',
|
||||
Copy('shlax', 'setup.py', '/app'),
|
||||
Copy('shlax/', 'setup.py', '/app'),
|
||||
Pip('/app'),
|
||||
commit='yourlabs/shlax',
|
||||
)
|
||||
|
||||
gitlabci = GitLabCIConfig(
|
||||
Job('test',
|
||||
build=dict(
|
||||
stage='test',
|
||||
image='yourlabs/shlax',
|
||||
script='pip install -U .[test] && ' + PYTEST,
|
||||
),
|
||||
test=dict(
|
||||
stage='test',
|
||||
image='yourlabs/python',
|
||||
script='pip install -U .[test] && ' + PYTEST,
|
||||
),
|
||||
Job('pypi',
|
||||
pypi=dict(
|
||||
stage='deploy',
|
||||
image='yourlabs/python',
|
||||
script='pypi-release',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user