[ci/cd] stages
This commit is contained in:
parent
90203b2edf
commit
a1c1bf04df
|
@ -27,7 +27,12 @@ cache:
|
||||||
- .cache/pip
|
- .cache/pip
|
||||||
- venv/
|
- venv/
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- test
|
||||||
|
- build
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
stage: test
|
||||||
script:
|
script:
|
||||||
- apt-get update && apt-get -y install python3-venv
|
- apt-get update && apt-get -y install python3-venv
|
||||||
- python3 -V # Print out python version for debugging
|
- python3 -V # Print out python version for debugging
|
||||||
|
@ -37,7 +42,8 @@ test:
|
||||||
- PYTHONPATH=./tests/ pipenv run pytest -v ./tests
|
- PYTHONPATH=./tests/ pipenv run pytest -v ./tests
|
||||||
- pipenv run halfapi --version
|
- pipenv run halfapi --version
|
||||||
|
|
||||||
run:
|
build_pypi:
|
||||||
|
stage: build
|
||||||
script:
|
script:
|
||||||
- apt-get update && apt-get -y install python3-venv
|
- apt-get update && apt-get -y install python3-venv
|
||||||
- python3 -V # Print out python version for debugging
|
- python3 -V # Print out python version for debugging
|
||||||
|
@ -49,7 +55,8 @@ run:
|
||||||
paths:
|
paths:
|
||||||
- dist/*.whl
|
- dist/*.whl
|
||||||
|
|
||||||
build:
|
build_container:
|
||||||
|
stage: build
|
||||||
image: $CI_REGISTRY/devtools/kaniko
|
image: $CI_REGISTRY/devtools/kaniko
|
||||||
script:
|
script:
|
||||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
||||||
|
|
Loading…
Reference in New Issue