Skip to content
Snippets Groups Projects
Commit 71566600 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

feat(cicd): init cicd with build

parent 13e5b816
No related branches found
No related tags found
No related merge requests found
image: docker:git
services:
- docker:dind
stages:
- sonar-analysis
- build
- deploy
build:
image: docker:18.09
services:
- docker:18.09-dind
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
code_analysis:
image: skilldlabs/sonar-scanner:3.4.0
services:
- docker:18.09-dind
stage: sonar-analysis
only:
- dev
script:
- >
sonar-scanner
-Dsonar.projectName=${SONAR_PROJECT_KEY}
-Dsonar.projectVersion=1.0
-Dsonar.sourceEncoding=UTF-8
-Dsonar.projectBaseDir=.
-Dsonar.host.url=${SONAR_URL}
-Dsonar.projectKey=${SONAR_PROJECT_KEY}
-Dsonar.login=${SONAR_TOKEN}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment