-
Notifications
You must be signed in to change notification settings - Fork 5
Integration as a sonar page #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
AMorgaut
wants to merge
8
commits into
main
Choose a base branch
from
3-integration-as-a-sonar-page
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
90cfc00
Sonar plugin integration.
Bebelkacem 413abee
Ecocode Dashboard plugin integration.
Bebelkacem b5c31f9
correction for sonar-plugin
dedece35 a5228af
correction for sonar-plugin - update shade
dedece35 409f6aa
add corrections for the plugin to be deployed and well displayed (con…
dedece35 22b8a95
add DEV_TMP.md and tool for manual testing (temp)
dedece35 a4b8daf
update DEV_TMP.md
dedece35 6ef5f66
update DEV_TMP.md
dedece35 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Dockerfile to build a SonarQube plugin with Maven and run it in SonarQube | ||
|
|
||
| ARG MAVEN_BUILDER=3-openjdk-17-slim | ||
| ARG SONARQUBE_VERSION=25.9.0.112764-community | ||
|
|
||
| # STEP 1 : build the SonarQube plugin with Maven | ||
| #FROM maven:${MAVEN_BUILDER} AS builder | ||
|
|
||
| #USER root | ||
| # | ||
| #RUN apt-get update && \ | ||
| # apt-get install -y curl && \ | ||
| # curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \ | ||
| # apt-get install -y nodejs | ||
| # | ||
| #RUN echo "node -version :" && node --version | ||
| #RUN echo "npm -version :" && npm --version | ||
| # | ||
| #RUN corepack enable && corepack prepare [email protected] --activate | ||
| #RUN echo "pnpm -version :" && pnpm --version | ||
|
|
||
| #COPY . /usr/src/creedengo | ||
| # | ||
| #WORKDIR /usr/src/creedengo | ||
| #COPY src src/ | ||
| #COPY pom.xml tool_build.sh ./ | ||
| # | ||
| #RUN echo "********** --- ********** Contenu du dossier - ETAPE 1 :" && ls -l | ||
| #RUN echo "********** --- ********** Contenu du dossier 'target' - ETAPE 2 :" && ls -l target | ||
| #RUN echo "********** --- ********** Contenu du dossier 'node' - ETAPE 3 :" && ls -l node | ||
| #RUN echo "********** --- ********** Contenu du dossier 'node_modules' - ETAPE 4 :" && ls -l node_modules | ||
| #RUN echo "********** --- ********** Contenu du dossier 'node_modules/@creedengo' - ETAPE 4 :" && ls -l node_modules/@creedengo | ||
| #RUN echo "node -version :" && node --version | ||
| #RUN echo "pnpm -version :" && pnpm --version | ||
| # | ||
| #RUN mvn clean package -DskipTests,docker | ||
|
|
||
| # STEP 2 : create a SonarQube image with the plugin installed | ||
| FROM sonarqube:${SONARQUBE_VERSION} | ||
|
|
||
| #COPY --from=builder /usr/src/creedengo/target/creedengo-*.jar /opt/sonarqube/extensions/plugins/ | ||
|
|
||
| USER sonarqube |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # Docker Compose file for SonarQube service for Creedengo Dashboard | ||
|
|
||
| name: sonarqube_creedengo_dashboard | ||
|
|
||
| services: | ||
| sonar: | ||
| build: . | ||
| container_name: sonar_creedengo_dashboard | ||
| ports: | ||
| - ":9000" | ||
| networks: | ||
| - sonarnet | ||
| depends_on: | ||
| db: | ||
| condition: service_healthy | ||
| environment: | ||
| SONAR_JDBC_USERNAME: sonar | ||
| SONAR_JDBC_PASSWORD: sonar | ||
| SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonarqube | ||
| SONAR_ES_BOOTSTRAP_CHECKS_DISABLE: 'true' | ||
| env_file: | ||
| - path: ./.default.docker.env | ||
| required: true | ||
| - path: ./.override.docker.env | ||
| required: false | ||
| volumes: | ||
| - "extensions:/opt/sonarqube/extensions" | ||
| - "logs:/opt/sonarqube/logs" | ||
| - "data:/opt/sonarqube/data" | ||
|
|
||
| db: | ||
| image: postgres:12 | ||
| container_name: postgresql_creedengo_dashboard | ||
| networks: | ||
| - sonarnet | ||
| volumes: | ||
| - pg_data:/var/lib/postgresql/data | ||
| environment: | ||
| POSTGRES_USER: sonar | ||
| POSTGRES_PASSWORD: sonar | ||
| POSTGRES_DB: sonarqube | ||
| PGDATA: pg_data:/var/lib/postgresql/data/pgdata | ||
| healthcheck: | ||
| test: [ "CMD-SHELL", "pg_isready -U sonar -d sonarqube" ] | ||
| interval: 5s | ||
| timeout: 5s | ||
| retries: 5 | ||
|
|
||
| networks: | ||
| sonarnet: | ||
| driver: bridge | ||
|
|
||
| volumes: | ||
| data: | ||
| logs: | ||
| extensions: | ||
| pg_data: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env sh | ||
|
|
||
| mvn clean package -DskipTests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env sh | ||
|
|
||
| docker-compose down --volumes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #!/usr/bin/env sh | ||
|
|
||
| # docker-compose up --build -d | ||
|
|
||
| # pour avoir les logs de ce qui se passe dans le container lors de sa construction et deploiement | ||
| # Build avec logs visibles | ||
| docker-compose build --progress=plain --no-cache | ||
| # Puis lancer en détaché | ||
| docker-compose up -d |
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. si on garde ce fichier, il faudra le traduire ;-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/usr/bin/env sh | ||
|
|
||
| NOM_CONTAINER=sonar_creedengo_dashboard | ||
| REPERTOIRE_EXTENSIONS=/opt/sonarqube/extensions/plugins/. | ||
|
|
||
| echo "********** AVANT installation du plugin (répertoire '') :" | ||
| docker exec $NOM_CONTAINER ls $REPERTOIRE_EXTENSIONS | ||
|
|
||
| echo "********** Installation du plugin 'creedengo-dashboard' :" | ||
| docker cp target/creedengo-dashboard-plugin-*.jar $NOM_CONTAINER:$REPERTOIRE_EXTENSIONS | ||
|
|
||
| echo "********** Installation du plugin 'creedengo-python' :" | ||
| docker cp ../creedengo-python-plugin-*.jar $NOM_CONTAINER:$REPERTOIRE_EXTENSIONS | ||
|
|
||
| echo "********** APRES installation du plugin :" | ||
| docker exec $NOM_CONTAINER ls $REPERTOIRE_EXTENSIONS | ||
|
|
||
| echo "********** Redémarrage du container pour prise en compte du nouveau plugin" | ||
| docker restart $NOM_CONTAINER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env sh | ||
|
|
||
| docker-compose logs -f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/usr/bin/env sh | ||
|
|
||
| pnpm install | ||
| pnpm build |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah je vois que tu l'as corrigé