Skip to content

Commit

Permalink
setup QA
Browse files Browse the repository at this point in the history
  • Loading branch information
tomverin committed Mar 17, 2016
1 parent b59b0e9 commit 3e92263
Show file tree
Hide file tree
Showing 23 changed files with 300 additions and 113 deletions.
21 changes: 21 additions & 0 deletions .cix.yml
@@ -0,0 +1,21 @@
# Definition of QA pipeline at SonarSource


TEST:
- plugin
- ruling

SQ_VERSION:
- DEV
- LATEST_RELEASE
- LTS

exclude:
- TEST: plugin
SQ_VERSION: LATEST_RELEASE

- TEST: ruling
SQ_VERSION: DEV

- TEST: ruling
SQ_VERSION: LTS
13 changes: 3 additions & 10 deletions .travis.yml
Expand Up @@ -8,16 +8,6 @@ install: true
script: ./travis.sh
env:
- TEST=ci

- TEST=ruling
SQ_VERSION=LATEST_RELEASE

- TEST=plugin
SQ_VERSION=DEV

- TEST=plugin
SQ_VERSION=LTS

matrix:
fast_finish: true

Expand All @@ -27,3 +17,6 @@ cache:

notifications:
email: false
webhooks:
- secure: "W2KMCYTiAXrxgJW9ErsCTuLbLzUPYN2zEVPseOIooOwBajdPyefJ5hASUQXT2h06e6e5ID44xD70zZ3BXucPkXTFD2s1BcHpb7tzJt9vgaraZJFu4eBRRFG7hnqsJUWNzyTukGOypvbZtg5jnS39mDHSUk/RmugNZlvs9uBrzE8="

17 changes: 17 additions & 0 deletions cix.sh
@@ -0,0 +1,17 @@
#!/bin/bash
set -euo pipefail
echo "Running $TEST with SQ=$SQ_VERSION"

case "$TEST" in
plugin|ruling)

cd its/$TEST
mvn -Dsonar.runtimeVersion="$SQ_VERSION" -Dmaven.test.redirectTestOutputToFile=false package
;;

*)
echo "Unexpected TEST mode: $TEST"
exit 1
;;
esac

11 changes: 8 additions & 3 deletions its/plugin/plugins/php-custom-rules-plugin/pom.xml
Expand Up @@ -3,9 +3,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.sonarsource.it.php</groupId>
<parent>
<groupId>org.sonarsource.php</groupId>
<artifactId>it-php-plugin-plugins</artifactId>
<version>2.9-SNAPSHOT</version>
</parent>

<groupId>org.sonarsource.php</groupId>
<artifactId>php-custom-rules-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>sonar-plugin</packaging>

<name>PHP Custom Rules Plugin</name>
Expand All @@ -23,7 +28,7 @@
<groupId>org.sonarsource.php</groupId>
<artifactId>sonar-php-plugin</artifactId>
<type>sonar-plugin</type>
<version>2.9-SNAPSHOT</version>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
@@ -1,7 +1,21 @@
/*
* Copyright (C) 2009-2013 SonarSource SA
* All rights reserved
* SonarQube PHP Plugin
* Copyright (C) 2011-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonar.samples.php;

Expand Down
@@ -1,7 +1,21 @@
/*
* Copyright (C) 2009-2013 SonarSource SA
* All rights reserved
* SonarQube PHP Plugin
* Copyright (C) 2011-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonar.samples.php;

Expand Down
@@ -1,7 +1,21 @@
/*
* Copyright (C) 2009-2013 SonarSource SA
* All rights reserved
* SonarQube PHP Plugin
* Copyright (C) 2011-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonar.samples.php;

Expand Down
@@ -1,7 +1,21 @@
/*
* Copyright (C) 2009-2013 SonarSource SA
* All rights reserved
* SonarQube PHP Plugin
* Copyright (C) 2011-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonar.samples.php;

Expand Down
4 changes: 2 additions & 2 deletions its/plugin/plugins/pom.xml
Expand Up @@ -4,9 +4,9 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.sonarsource.it.php</groupId>
<groupId>org.sonarsource.php</groupId>
<artifactId>it-php-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<version>2.9-SNAPSHOT</version>
</parent>

<artifactId>it-php-plugin-plugins</artifactId>
Expand Down
10 changes: 5 additions & 5 deletions its/plugin/pom.xml
Expand Up @@ -4,15 +4,15 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.sonarsource.parent</groupId>
<artifactId>parent</artifactId>
<version>24</version>
<groupId>org.sonarsource.php</groupId>
<artifactId>php-its</artifactId>
<version>2.9-SNAPSHOT</version>
</parent>

<groupId>org.sonarsource.it.php</groupId>
<groupId>org.sonarsource.php</groupId>
<artifactId>it-php-plugin</artifactId>
<name>SonarSource :: PHP :: ITs :: Plugin</name>
<version>1.0-SNAPSHOT</version>
<version>2.9-SNAPSHOT</version>
<packaging>pom</packaging>

<organization>
Expand Down
47 changes: 45 additions & 2 deletions its/plugin/tests/pom.xml
Expand Up @@ -4,9 +4,9 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.sonarsource.it.php</groupId>
<groupId>org.sonarsource.php</groupId>
<artifactId>it-php-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<version>2.9-SNAPSHOT</version>
</parent>

<artifactId>it-php-plugin-tests</artifactId>
Expand Down Expand Up @@ -51,5 +51,48 @@
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>qa</id>
<activation>
<property>
<name>env.SONARSOURCE_QA</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>copy-plugin</id>
<phase>generate-test-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>sonar-php-plugin</artifactId>
<version>${project.version}</version>
<type>sonar-plugin</type>
<overWrite>true</overWrite>
</artifactItem>
</artifactItems>
<outputDirectory>../../../sonar-php-plugin/target</outputDirectory>
<overWriteReleases>true</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
@@ -1,7 +1,7 @@
/*
* PHP :: Integration Tests
* Copyright (C) 2011 SonarSource
* sonarqube@googlegroups.com
* SonarQube PHP Plugin
* Copyright (C) 2011-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -13,9 +13,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package com.sonar.it.php;

Expand Down
@@ -1,7 +1,7 @@
/*
* PHP :: Integration Tests
* Copyright (C) 2011 SonarSource
* sonarqube@googlegroups.com
* SonarQube PHP Plugin
* Copyright (C) 2011-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -13,9 +13,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package com.sonar.it.php;

Expand Down
@@ -1,7 +1,7 @@
/*
* PHP :: Integration Tests
* Copyright (C) 2011 SonarSource
* sonarqube@googlegroups.com
* SonarQube PHP Plugin
* Copyright (C) 2011-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -13,9 +13,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package com.sonar.it.php;

Expand Down
12 changes: 6 additions & 6 deletions its/plugin/tests/src/test/java/com/sonar/it/php/PHPTest.java
@@ -1,7 +1,7 @@
/*
* PHP :: Integration Tests
* Copyright (C) 2011 SonarSource
* sonarqube@googlegroups.com
* SonarQube PHP Plugin
* Copyright (C) 2011-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -13,9 +13,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package com.sonar.it.php;

Expand Down

0 comments on commit 3e92263

Please sign in to comment.