Better to define script

This commit is contained in:
jpic 2020-02-16 18:23:22 +01:00
parent 3f4738f432
commit a5f6c4fe74
2 changed files with 3 additions and 4 deletions

View File

@ -3,12 +3,12 @@ build:
key: cache
paths: [.cache]
image: yourlabs/shlax
script: ./shlaxfile.py build
script: CACHE_DIR=$(pwd)/.cache ./shlaxfile.py -d shlax build push
stage: build
pypi:
image: yourlabs/python
only: [tags]
script: ./shlaxfile.py pypi
script: pypi-release
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}

View File

@ -10,7 +10,6 @@ class GitLabCI(Script):
for key, value in self.kwargs.items():
if isinstance(value, dict):
output[key] = deepcopy(value)
output[key]['script'] = './shlaxfile.py ' + key
image = output[key].get('image', 'alpine')
if hasattr(image, 'image'):
output[key]['image'] = image.image.repository + ':$CI_COMMIT_SHORT_SHA'