diff --git a/maven-packages/sonarqube.yml b/maven-packages/sonarqube.yml index cb4dc65eae2ae816967c2e4f1e5b76603b6c6640..f8b8577a4d91aee9ceb59a99a7b551bce17a4f17 100644 --- a/maven-packages/sonarqube.yml +++ b/maven-packages/sonarqube.yml @@ -2,7 +2,7 @@ sonarqube-check: image: $ACR_URL/maven:3.6.3-jdk-11 tags: - docker - stage: .pre + stage: code_analysis variables: SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task diff --git a/project-maven-azure-docker/sonarqube.yml b/project-maven-azure-docker/sonarqube.yml new file mode 100644 index 0000000000000000000000000000000000000000..a6a5d8fe01e65cb1472dce3710a25eb46102ee4a --- /dev/null +++ b/project-maven-azure-docker/sonarqube.yml @@ -0,0 +1,21 @@ +sonarqube-check: + image: $ACR_URL/maven:3.6.3-jdk-11 + tags: + - docker + stage: code_analysis + variables: + SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache + GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task + cache: + key: "${CI_JOB_NAME}" + paths: + - .sonar/cache + script: + - mkdir -p $CI_PROJECT_DIR/.m2 + - cp $MAVEN_SETTINGS_XML $CI_PROJECT_DIR/.m2/settings.xml + - cp $NPMRC $CI_PROJECT_DIR/$MAVEN_POM_DIR/.npmrc + - mvn $MAVEN_CLI_OPTS -f $MAVEN_POM_DIR/pom.xml --settings $CI_PROJECT_DIR/.m2/settings.xml verify sonar:sonar + allow_failure: true + only: + - master + - main \ No newline at end of file diff --git a/sonarqube/sonarqube-maven.yml b/sonarqube/sonarqube-maven.yml new file mode 100644 index 0000000000000000000000000000000000000000..ed977f339b518d3a9a08141f72152fba15261b71 --- /dev/null +++ b/sonarqube/sonarqube-maven.yml @@ -0,0 +1,16 @@ +sonarqube-check: + stage: code_analysis + image: maven:3.6.3-jdk-11 + variables: + SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache + GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task + cache: + key: "${CI_JOB_NAME}" + paths: + - .sonar/cache + script: + - mvn -f $MAVEN_POM_DIR/pom.xml verify sonar:sonar + allow_failure: true + only: + - master # or the name of your main branch + - main \ No newline at end of file diff --git a/strapi/README.md b/strapi/README.md index 118fa5fa706e6e86b2f540c5dfc5631af26749ee..50b2e169dcc1c6f22829a7bd162e306b7372016e 100644 --- a/strapi/README.md +++ b/strapi/README.md @@ -27,5 +27,4 @@ stages: - deploy include: - remote: 'https://git.code.tecnalia.com/digicon-webxr-store/ci-files/-/raw/master/project-maven-azure-docker/build.yml' - -``` +``` \ No newline at end of file