Better to define script
This commit is contained in:
parent
3f4738f432
commit
a5f6c4fe74
@ -3,12 +3,12 @@ build:
|
|||||||
key: cache
|
key: cache
|
||||||
paths: [.cache]
|
paths: [.cache]
|
||||||
image: yourlabs/shlax
|
image: yourlabs/shlax
|
||||||
script: ./shlaxfile.py build
|
script: CACHE_DIR=$(pwd)/.cache ./shlaxfile.py -d shlax build push
|
||||||
stage: build
|
stage: build
|
||||||
pypi:
|
pypi:
|
||||||
image: yourlabs/python
|
image: yourlabs/python
|
||||||
only: [tags]
|
only: [tags]
|
||||||
script: ./shlaxfile.py pypi
|
script: pypi-release
|
||||||
stage: deploy
|
stage: deploy
|
||||||
test: {image: 'yourlabs/shlax:$CI_COMMIT_SHORT_SHA', script: ./shlaxfile.py test,
|
test: {image: 'yourlabs/shlax:$CI_COMMIT_SHORT_SHA', script: ./shlaxfile.py -d test,
|
||||||
stage: test}
|
stage: test}
|
||||||
|
|||||||
@ -10,7 +10,6 @@ class GitLabCI(Script):
|
|||||||
for key, value in self.kwargs.items():
|
for key, value in self.kwargs.items():
|
||||||
if isinstance(value, dict):
|
if isinstance(value, dict):
|
||||||
output[key] = deepcopy(value)
|
output[key] = deepcopy(value)
|
||||||
output[key]['script'] = './shlaxfile.py ' + key
|
|
||||||
image = output[key].get('image', 'alpine')
|
image = output[key].get('image', 'alpine')
|
||||||
if hasattr(image, 'image'):
|
if hasattr(image, 'image'):
|
||||||
output[key]['image'] = image.image.repository + ':$CI_COMMIT_SHORT_SHA'
|
output[key]['image'] = image.image.repository + ':$CI_COMMIT_SHORT_SHA'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user