]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8420 Automated release
authorDavid Rautureau <david.rautureau@sonarsource.com>
Mon, 28 Nov 2016 11:09:14 +0000 (12:09 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 28 Nov 2016 11:09:14 +0000 (12:09 +0100)
* add artifactsToPublish to bintray

* export PROJECT_VERSION in env to be recorded in buildinfo

* Remove distributionManagement (deploy is done by the artifactory-maven-plugin)

* Enable release profile on Travis for maintenance branches

* Remove checksums calculation of the distribution (done by the release process)

* Remove javadoc profile (we only publish the javadoc of the plugin API)

pom.xml
sonar-application/pom.xml
travis.sh

diff --git a/pom.xml b/pom.xml
index e166677ca8e39acb3e6d5598139f473fb218f53f..1adfdfaabc1c577d5868d30cd8ae75482d52a7f4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <url>http://jira.sonarsource.com/browse/SONAR</url>
   </issueManagement>
 
-  <distributionManagement>
-    <repository>
-      <id>bintray</id>
-      <url>https://api.bintray.com/maven/sonarsource/SonarQube/${project.groupId}/;publish=1</url>
-    </repository>
-  </distributionManagement>
-
   <properties>
     <sonarUpdateCenter.version>1.17</sonarUpdateCenter.version>
     <sonarJava.version>4.0</sonarJava.version>
@@ -87,6 +80,8 @@
 
     <!-- used for deployment to SonarSource Artifactory -->
     <gitRepositoryName>sonarqube</gitRepositoryName>
+    <!-- Release: enable publication to Bintray -->
+    <artifactsToPublish>${project.groupId}:sonar-application:zip</artifactsToPublish>
   </properties>
 
   <build>
       </build>
     </profile>
 
-    <profile>
-      <id>javadoc</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-javadoc-plugin</artifactId>
-            <configuration>
-              <excludePackageNames>
-                net.*:org.sonar.application:org.sonar.server:org.sonar.graph:org.sonar.batch:org.sonar.channel:org.sonar.java:org.sonar.maven*:org.sonar.plugins.*:org.sonar.colorizer:org.sonar.core:org.sonar.duplications:org.sonar.markdown:com.*
-              </excludePackageNames>
-              <author>false</author>
-              <linksource>true</linksource>
-              <reportOutputDirectory>${project.reporting.outputDirectory}/${project.version}/apidocs
-              </reportOutputDirectory>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-
     <profile>
       <id>protobuf-compile</id>
       <activation>
index 153d6aaa74c0e3e796e6b05dadc6ebc84193e568..d2f68c7820e22dd2e430ec68aa8f415f0d2df93d 100644 (file)
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <configuration>
-              <failOnError>${checksum.failOnError}</failOnError>
-              <target>
-                <checksum file="${project.build.directory}/sonarqube-${project.version}.zip" algorithm="md5" />
-                <checksum file="${project.build.directory}/sonarqube-${project.version}.zip" algorithm="sha" />
-              </target>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-enforcer-plugin</artifactId>
index 8bac388b870a752c419e514bd8d345b310a9ff30..e5472131437cbbcee12ee490efc8c17db941e36b 100755 (executable)
--- a/travis.sh
+++ b/travis.sh
@@ -59,9 +59,11 @@ CI)
   elif [[ "$TRAVIS_BRANCH" == "branch-"* ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
     echo 'release branch: trigger QA, no analysis'
 
+    export PROJECT_VERSION=`maven_expression "project.version"`
+
     mvn deploy \
         $MAVEN_OPTIONS \
-        -Pdeploy-sonarsource
+        -Pdeploy-sonarsource,release
 
   elif [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ -n "${GITHUB_TOKEN:-}" ]; then
     echo 'Internal pull request: trigger QA and analysis'