sonar-scanner/.gitlab-ci.yml.old

37 lines
1.2 KiB
YAML
Raw Normal View History

2022-03-26 20:16:14 +01:00
stages: # List of stages for jobs, and their order of execution
2022-03-26 20:16:52 +01:00
- docker
2022-03-26 20:16:14 +01:00
2022-03-26 20:26:28 +01:00
docker-master:
2022-03-26 20:16:14 +01:00
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
2022-03-26 20:26:28 +01:00
- docker build -t registry.gitlab.com/guillaumehemmen/sonar-scanner:latest .
- docker push registry.gitlab.com/guillaumehemmen/sonar-scanner:latest
- docker build -t registry.gitlab.com/guillaumehemmen/sonar-scanner:$CI_COMMIT_SHA .
- docker push registry.gitlab.com/guillaumehemmen/sonar-scanner:$CI_COMMIT_SHA
2022-03-26 20:16:14 +01:00
only:
- master
2022-03-26 20:26:28 +01:00
docker-tag:
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
2022-03-26 20:30:08 +01:00
- docker build -t registry.gitlab.com/guillaumehemmen/sonar-scanner:latest .
- docker push registry.gitlab.com/guillaumehemmen/sonar-scanner:latest
2022-03-26 20:26:28 +01:00
- docker build -t registry.gitlab.com/guillaumehemmen/sonar-scanner:$CI_COMMIT_REF_NAME .
- docker push registry.gitlab.com/guillaumehemmen/sonar-scanner:$CI_COMMIT_REF_NAME
only:
- tags