Add deploy stage to GitLab CI for DockerHub integration
This commit is contained in:
parent
ca78223d8e
commit
611d11292a
@ -3,6 +3,7 @@ image: python:latest
|
|||||||
stages:
|
stages:
|
||||||
- lint
|
- lint
|
||||||
- test
|
- test
|
||||||
|
- deploy
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- pip install poetry
|
- pip install poetry
|
||||||
@ -26,3 +27,21 @@ test:
|
|||||||
coverage_report:
|
coverage_report:
|
||||||
coverage_format: cobertura
|
coverage_format: cobertura
|
||||||
path: coverage.xml
|
path: coverage.xml
|
||||||
|
|
||||||
|
deploy_to_dockerhub:
|
||||||
|
stage: deploy
|
||||||
|
needs:
|
||||||
|
- test
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- master
|
||||||
|
except:
|
||||||
|
- tags
|
||||||
|
image: docker:latest
|
||||||
|
services:
|
||||||
|
- docker:dind
|
||||||
|
before_script:
|
||||||
|
- docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
|
||||||
|
- docker buildx create --use
|
||||||
|
script:
|
||||||
|
- docker buildx build --push --tag rogsme/cleanmedia:latest .
|
||||||
|
Loading…
x
Reference in New Issue
Block a user