Fakultas Ilmu Komputer UI

Commit 8b6d18c4 authored by kemas's avatar kemas
Browse files

add sonar-scan to gitlab-ci.yml

parent bb4541ff
Pipeline #63556 failed
......@@ -27,6 +27,32 @@ Formatter Checks:
- isort --check .
- black --check .
sonar-scan:
image:
name: sonarsource/sonar-scanner-cli:4.6
entrypoint: [""]
stage: test
variables:
SONAR_USER_HOME: $CI_PROJECT_DIR/.sonar
SONAR_HOST_URL: $SONARQUBE_HOST_URL
SONAR_LOGIN: $SONARQUBE_TOKEN
GIT_DEPTH: 0
cache:
key: $CI_JOB_NAME
paths:
- .sonar/cache
script:
sonar-scanner
-Dsonar.projectKey=akun-cs
-Dsonar.sources=.
-Dsonar.host.url=$SONAR_HOST_URL
-Dsonar.login=$SONAR_LOGIN
-Dsonar.sourceEncoding=UTF-8
allow_failure: true
only:
- master
- tags
Container Image:
image:
name: gcr.io/kaniko-project/executor:debug-v1.2.0
......@@ -37,6 +63,7 @@ Container Image:
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/docs.Dockerfile --destination $REGISTRY_HOST/$REGISTRY_REPO_AKUN_DOCS:latest
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: manual
Container Tagged:
image:
......@@ -48,3 +75,4 @@ Container Tagged:
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/docs.Dockerfile --destination $REGISTRY_HOST/$REGISTRY_REPO_AKUN_DOCS:$CI_COMMIT_TAG
rules:
- if: $CI_COMMIT_TAG
when: manual
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment