Skip to content
Snippets Groups Projects
Commit 7b561d42 authored by Sébastien Dinot's avatar Sébastien Dinot
Browse files

Taken into account SonarQube migration and new requirements

parent d3562459
No related branches found
No related tags found
1 merge request!9Develop
......@@ -4,7 +4,7 @@ stages:
default:
# Default image
image: registry.orekit.org/orekit/ci-utils/maven:3.3.9-jdk-8
image: registry.orekit.org/orekit/ci-utils/maven:3.9.6-eclipse-temurin-11
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_REF_NAME"'
cache:
......@@ -19,12 +19,20 @@ variables:
# when running from the command line.
# `installAtEnd` and `deployAtEnd` are only effective with recent version of the corresponding plugins.
MAVEN_CLI_OPTS: "-s .CI/maven-settings.xml --batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
SONAR_PROJECT_KEY: "${CI_PROJECT_NAMESPACE}:${CI_PROJECT_NAME}"
SONAR_PROJECT_NAME: "${CI_PROJECT_TITLE} (${CI_PROJECT_NAMESPACE}:${CI_PROJECT_NAME})"
verify:
stage: verify
script:
- mvn $MAVEN_CLI_OPTS verify site
- mvn $MAVEN_CLI_OPTS sonar:sonar -Dsonar.login=${SONAR_TOKEN} -Dsonar.branch.name=${CI_COMMIT_REF_NAME}
- mvn $MAVEN_CLI_OPTS checkstyle:check verify site
- test -z "$SONAR_TOKEN" || mvn $MAVEN_CLI_OPTS sonar:sonar
-Dsonar.host.url=${SONAR_HOST_URL}
-Dsonar.login=${SONAR_TOKEN}
-Dsonar.branch.name=${CI_COMMIT_REF_NAME}
-Dsonar.projectKey="$SONAR_PROJECT_KEY"
-Dsonar.projectName="$SONAR_PROJECT_NAME"
-Dsonar.qualitygate.wait=true
artifacts:
paths:
- target/*.jar
......@@ -33,6 +41,16 @@ verify:
junit:
- target/surefire-reports/*.xml
verify:warning:
stage: verify
script:
- echo "Please, configure SonarQube by following steps described in the contribution guide:"
- echo "https://www.orekit.org/site-rugged-development/contributing.html"
- exit 1
allow_failure: true
rules:
- if: $SONAR_TOKEN == null
# On main branches (develop, release-*, master)
# the produced artifacts are deployed on the Nexus of the project
# (https://packages.orekit.org/)
......@@ -48,31 +66,20 @@ deploy:artifacts:
- /^release-[.0-9]+$/@orekit/rugged
- master@orekit/rugged
deploy:site:
stage: deploy
before_script:
##
## Create the SSH directory and give it the right permissions
##
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
##
## We're using tr to fix line endings which makes ed25519 keys work
## without extra base64 encoding.
## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
##
- echo "$SSH_SECRET_KEY" > ~/.ssh/id_website
- chmod 700 ~/.ssh/id_website
##
## Add known hosts
##
- cp $SSH_KNOWN_HOSTS ~/.ssh/known_hosts
# Prepare the SSH environment required to push documentation onto the server
- eval $(ssh-agent -s)
- echo "$SSH_SECRET_KEY" | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- cp $SSH_KNOWN_HOSTS ~/.ssh/known_hosts
script:
- mvn $MAVEN_CLI_OPTS site:deploy
- PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
- rsync -rz --links --checksum --no-perms --chmod=u=rwX,go=rX --delete-after
target/site/ ${TARGET_URL_PREFIX}-${PROJECT_VERSION}
only:
- master@orekit/rugged
- /^release-[.0-9]+$/@orekit/rugged
- develop@orekit/rugged
- master@orekit/rugged
- /^release-[.0-9]+$/@orekit/rugged
- develop@orekit/rugged
......@@ -17,21 +17,17 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- COTS version -->
<rugged.orekit.version>11.3.2</rugged.orekit.version>
<rugged.junit.version>4.13.2</rugged.junit.version>
<!-- Compilers and Tools version -->
<rugged.compiler.source>1.8</rugged.compiler.source>
<rugged.compiler.target>1.8</rugged.compiler.target>
<rugged.implementation.build>${git.revision}; ${maven.build.timestamp}</rugged.implementation.build>
<!-- sonar related properties -->
<sonar.host.url>https://sonar.orekit.org/</sonar.host.url>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<rugged.spotbugs-maven-plugin.version>4.5.3.0</rugged.spotbugs-maven-plugin.version>
<rugged.jacoco-maven-plugin.version>0.8.8</rugged.jacoco-maven-plugin.version>
<rugged.maven-bundle-plugin.version>5.1.8</rugged.maven-bundle-plugin.version>
......@@ -49,8 +45,6 @@
<rugged.maven-resources-plugin.version>3.3.0</rugged.maven-resources-plugin.version>
<rugged.maven-site-plugin.version>3.12.1</rugged.maven-site-plugin.version>
<rugged.maven-source-plugin.version>3.2.1</rugged.maven-source-plugin.version>
<!-- Surefire 2.22.2 is the last to support CentOS/RedHat 7 due to
https://issues.apache.org/jira/browse/SUREFIRE-1628 -->
<rugged.maven-surefire-plugin.version>2.22.2</rugged.maven-surefire-plugin.version>
<rugged.maven-surefire-report-plugin.version>3.0.0-M6</rugged.maven-surefire-report-plugin.version>
<rugged.jgit.buildnumber.version>1.2.12</rugged.jgit.buildnumber.version>
......@@ -58,7 +52,7 @@
<rugged.nexus-staging-maven-plugin.version>1.6.13</rugged.nexus-staging-maven-plugin.version>
<rugged.maven-gpg-plugin.version>3.0.1</rugged.maven-gpg-plugin.version>
<rugged.maven-install-plugin.version>3.0.1</rugged.maven-install-plugin.version>
</properties>
<developers>
......
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