Update .gitlab-ci.yml file
This commit is contained in:
parent
a82cef9b3c
commit
371c8764d9
1 changed files with 20 additions and 0 deletions
20
.gitlab-ci.yml
Normal file
20
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
stages: # List of stages for jobs, and their order of execution
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
docker:
|
||||||
|
stage: docker
|
||||||
|
image: docker:stable
|
||||||
|
services:
|
||||||
|
- docker:dind
|
||||||
|
variables:
|
||||||
|
DOCKER_DRIVER: overlay2
|
||||||
|
script:
|
||||||
|
- docker info
|
||||||
|
- docker login registry.gitlab.com -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
|
||||||
|
- docker build -t registry.gitlab.com/guillaumehemmen/sonar-scanner/$CI_COMMIT_REF_NAME:latest .
|
||||||
|
- docker push registry.gitlab.com/guillaumehemmen/sonar-scanner/$CI_COMMIT_REF_NAME:latest
|
||||||
|
- docker build -t registry.gitlab.com/guillaumehemmen/sonar-scanner/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHA .
|
||||||
|
- docker push registry.gitlab.com/guillaumehemmen/sonar-scanner/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHA
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
- tags
|
Loading…
Reference in a new issue