From 8dbcff5342b997e92c484152a7eb1028c82bf67b Mon Sep 17 00:00:00 2001 From: Piv Date: Tue, 25 Aug 2020 22:22:45 +0930 Subject: [PATCH] Add deploy stage and regular python build stage to pycar CI build --- .gitlab-ci.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1caef68..9de3257 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,26 @@ +stages: + - build + - deploy -build: +build_pycar: + image: vato.ddns.net:8083/python:3 + stage: build + script: + - cd pycar && python setup.py bdist_wheel && cd .. + +build_pycar_docker: image: vato.ddns.net:8083/docker stage: build script: - echo ${DOCKER_PASSWORD} | docker login vato.ddns.net:8083 --username ${DOCKER_USERNAME} --password-stdin - - docker build -f pycar/Dockerfile --build-arg PYPI_USERNAME=${PYPI_USERNAME} --build-arg PYPI_PASSWORD=${PYPI_PASSWORD} pycar + - docker build -f pycar/Dockerfile --build-arg PYPI_USERNAME=${PYPI_USERNAME} --build-arg PYPI_PASSWORD=${PYPI_PASSWORD} -t vato.ddns.net:8083/pycar:latest pycar + +deploy_pycar: + image: vato.ddns.net:8083/docker + stage: deploy + script: + - docker publish vato.ddns.net:8083/pycar:latest + needs: + - build_pycar_docker + only: + - tags