Fakultas Ilmu Komputer UI
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sonar Scanner CLI Image for Flutter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ichlasul Affan
Sonar Scanner CLI Image for Flutter
Commits
f478974f
Commit
f478974f
authored
5 years ago
by
Daya Adianto
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Fix GitLab CI job that runs SonarScanner"
This reverts commit
da2657b1
.
parent
da2657b1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+2
-5
2 additions, 5 deletions
.gitlab-ci.yml
Dockerfile
+1
-2
1 addition, 2 deletions
Dockerfile
README.md
+8
-9
8 additions, 9 deletions
README.md
with
11 additions
and
16 deletions
.gitlab-ci.yml
+
2
−
5
View file @
f478974f
...
...
@@ -5,10 +5,7 @@ stages:
-
deploy
SonarScanner Analysis
:
image
:
name
:
addianto/sonar-scanner-cli:latest
entrypoint
:
-
"
/bin/bash"
image
:
addianto/sonar-scanner-cli:latest
stage
:
test
script
:
-
sonar-scanner
...
...
@@ -30,4 +27,4 @@ Publish to Docker Hub:
tags
:
-
docker
only
:
-
master
-
master
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Dockerfile
+
1
−
2
View file @
f478974f
...
...
@@ -43,8 +43,7 @@ ENV DEBIAN_FRONTEND=''
## the value of USERNAME above
USER
sonar
WORKDIR
/home/sonar/workspace
ENTRYPOINT
["sonar-scanner"]
CMD
["sonar-scanner"]
# Container image metadata
## Note to editors: metadata values for `created`, `version`, and `revision`
...
...
This diff is collapsed.
Click to expand it.
README.md
+
8
−
9
View file @
f478974f
...
...
@@ -13,26 +13,25 @@ into SonarScanner via CLI prompt.
To run the container image locally using Docker:
```
bash
docker run
-v
$(
pwd
)
:/home/sonar/workspace addianto/sonar-scanner-cli:latest
[
sonar-scanner options]
docker run
-it
-v
$(
pwd
)
:/home/sonar/workspace addianto/sonar-scanner-cli:latest bash
sonar-scanner
[
sonar-scanner options]
```
> Note: The above example creates a local interactive shell within the running
> container where you can invoke `sonar-scanner` with the desired CLI options.
Example:
```
bash
docker run
-v
$(
pwd
)
:/home/sonar/workspace addianto/sonar-scanner-cli:latest
-Dsonar
.host.url
=
https://pmpl.cs.ui.ac.id/sonarqube
-Dsonar
.login
=[
REDACTED]
docker run
-it
-v
$(
pwd
)
:/home/sonar/workspace addianto/sonar-scanner-cli:latest bash
sonar-scanner
-Dsonar
.host.url
=
https://pmpl.cs.ui.ac.id/sonarqube
-Dsonar
.login
=[
YOUR TOKEN]
```
> Note: It is also possible to pass all possible SonarScanner's properties
> via CLI options. YMMV.
To use the container image as a base image for a CI job on GitLab CI/CD:
```
yaml
SonarScanner Analysis
:
image
:
name
:
addianto/sonar-scanner-cli:latest
entrypoint
:
-
"
/bin/bash"
image
:
addianto/sonar-scanner-cli:latest
# Ideally you want to run SonarScanner after the test suite has generated
# test & coverage report. The following is only an example to run
# SonarScanner concurrently with CI job(s) in `test` stage.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment