From 371c8764d98279b669caf6f1496cd5e9f3e92227 Mon Sep 17 00:00:00 2001 From: "Guillaume \"B.B.\" Van Hemmen" <458819-GuillaumeHemmen@users.noreply.gitlab.com> Date: Sat, 26 Mar 2022 19:16:14 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..b0fcba3 --- /dev/null +++ b/.gitlab-ci.yml @@ -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 \ No newline at end of file