Skip to content

Commit

Permalink
#175 Fix RCPTT on CI
Browse files Browse the repository at this point in the history
Changed to RCPTT 2.5.5.MO

JenkinsFile:
- Updated sonar organization & fixed issue with archiving
- Extracted Test steps to "Junit" and "RCPTT" wrapped in xvnc

Removed invalid parameters from Product

Now injects rcptt in aut for each rcptt test

Updated contexts and values / fixed some rcptt tests

Change-Id: Ia972d0ee08e7d5d2af923f86264c6e543848a197
  • Loading branch information
etraisnel2 authored and tguiu committed Apr 24, 2024
1 parent 84122d9 commit 2f225b3
Show file tree
Hide file tree
Showing 21 changed files with 757 additions and 557 deletions.
49 changes: 36 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline {
}
environment {
JACOCO_VERSION = "0.8.10"
MVN_QUALITY_PROFILES = '-P full -P test'
MVN_QUALITY_PROFILES = '-P full -P test -P rcptt'
JACOCO_EXEC_FILE_PATH = '${WORKSPACE}/jacoco.exec'
}
stages {
Expand All @@ -20,21 +20,18 @@ pipeline {
}
}

stage('Package & Test Capella Studio') {
stage('Package & Install Capella Studio') {
steps {
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) {
withEnv(['MAVEN_OPTS=-Xmx3g']) {
script {
def jacocoPrepareAgent = "-Djacoco.destFile=$JACOCO_EXEC_FILE_PATH -Djacoco.append=true org.jacoco:jacoco-maven-plugin:$JACOCO_VERSION:prepare-agent"
sh "mvn -Dmaven.test.failure.ignore=true -Dtycho.localArtifacts=ignore ${jacocoPrepareAgent} clean verify -P full -P sign -P product -P test -e -f pom.xml"
}
withEnv(['MAVEN_OPTS=-Xmx3g']) {
script {
sh "mvn clean install -P full -P sign -P product -e "
}
}
}
}
}
stage('Archive artifacts') {
steps {
archiveArtifacts artifacts: 'releng/plugins/org.polarsys.capella.studio.releng.product/target/*.txt, releng/plugins/org.polarsys.capella.studio.releng.updatesite/target/repository/**, releng/plugins/org.polarsys.capella.studio.releng.updatesite/target/*.txt'
archiveArtifacts artifacts: 'releng/plugins/org.polarsys.capella.studio.releng.updatesite/target/repository/**'
}
}
stage('Deploy') {
Expand Down Expand Up @@ -62,6 +59,32 @@ pipeline {
}
}
}

stage('Run RCPTT Tests') {
steps {
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) {
withEnv(['MAVEN_OPTS=-Xmx3g']) {
script {
def jacocoPrepareAgent = "-Djacoco.destFile=$JACOCO_EXEC_FILE_PATH -Djacoco.append=true org.jacoco:jacoco-maven-plugin:$JACOCO_VERSION:prepare-agent"
sh "mvn -Dmaven.test.failure.ignore=true -Dtycho.localArtifacts=ignore ${jacocoPrepareAgent} verify -P rcptt -e "
}
}
}
}
}
stage('Run JUnit Tests') {
steps {
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) {
withEnv(['MAVEN_OPTS=-Xmx3g']) {
script {
def jacocoPrepareAgent = "-Djacoco.destFile=$JACOCO_EXEC_FILE_PATH -Djacoco.append=true org.jacoco:jacoco-maven-plugin:$JACOCO_VERSION:prepare-agent"
sh "mvn -Dmaven.test.failure.ignore=true -Dtycho.localArtifacts=ignore ${jacocoPrepareAgent} verify -P full -P product -P test -e "
}
}
}
}
}

stage('Publish tests results') {
steps {
junit allowEmptyResults: true, testResults: '*.xml,**/target/surefire-reports/*.xml'
Expand All @@ -72,15 +95,15 @@ pipeline {
environment {
PROJECT_NAME = 'capella-studio'
SONARCLOUD_TOKEN = credentials('sonar-token-capella-studio')
SONAR_PROJECT_KEY = 'eclipse_capella-studio'
SONAR_PROJECT_KEY = 'eclipse-capella_capella-studio'
}
steps {
withEnv(['MAVEN_OPTS=-Xmx4g']) {
withEnv(['MAVEN_OPTS=-Xmx3g']) {
script {
def jacocoParameters = "-Dsonar.coverage.jacoco.xmlReportPaths='target/site/jacoco/jacoco.xml,target/surefire-reports/TEST*.xml' -Dsonar.java.coveragePlugin=jacoco -Dsonar.core.codeCoveragePlugin=jacoco "
def sonarExclusions = "-Dsonar.exclusions='**/generated/**/*.java,**/src-gen/**/*.java' "
def javaVersion = "8"
def sonarCommon = "sonar:sonar -Dsonar.projectKey=$SONAR_PROJECT_KEY -Dsonar.organization=eclipse -Dsonar.host.url=https://sonarcloud.io -Dsonar.login='$SONARCLOUD_TOKEN' -Dsonar.skipDesign=true -Dsonar.dynamic=reuseReports -Dsonar.java.source=${javaVersion} -Dsonar.scanner.force-deprecated-java-version=true "
def sonarCommon = "sonar:sonar -Dsonar.projectKey=$SONAR_PROJECT_KEY -Dsonar.organization=eclipse-capella -Dsonar.host.url=https://sonarcloud.io -Dsonar.login='$SONARCLOUD_TOKEN' -Dsonar.skipDesign=true -Dsonar.dynamic=reuseReports -Dsonar.java.source=${javaVersion} -Dsonar.scanner.force-deprecated-java-version=true "
def sonarBranchAnalysis = "-Dsonar.branch.name=${BRANCH_NAME}"
def sonarPullRequestAnalysis = ("${BRANCH_NAME}".contains('PR-') ? "-Dsonar.pullrequest.provider=GitHub -Dsonar.pullrequest.github.repository=eclipse/$PROJECT_NAME -Dsonar.pullrequest.key=${CHANGE_ID} -Dsonar.pullrequest.branch=${CHANGE_BRANCH}" : "" )
def sonar = sonarCommon + jacocoParameters + sonarExclusions + ("${BRANCH_NAME}".contains('PR-') ? sonarPullRequestAnalysis : sonarBranchAnalysis)
Expand Down
9 changes: 9 additions & 0 deletions doc/plugins/org.polarsys.capella.studio.doc/rcptt.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- RCPTT testcase ---
Format-Version: 1.0
Element-Name: Project Settings
Element-Type: projectMetadata
Element-Version: 2.0
Id: _IvWhAFyGEe6oOPzqtLfomQ
Runtime-Version: 2.5.5.202309070639
Save-Time: 9/26/23, 6:02 PM

5 changes: 5 additions & 0 deletions extension/tests/org.polarsys.capella.extension.rcptt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
<groupId>org.polarsys.capella</groupId>
<artifactId>org.polarsys.capella.studio.releng.product</artifactId>
<version>${project.version}</version>
<injections>
<injection>
<site>https://download.eclipse.org/rcptt/milestone/2.5.5/MO/repository</site>
</injection>
</injections>
</aut>
</configuration>
</plugin>
Expand Down
5 changes: 5 additions & 0 deletions gendoc/tests/org.polarsys.capella.gen.doc.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
<groupId>org.polarsys.capella</groupId>
<artifactId>org.polarsys.capella.studio.releng.product</artifactId>
<version>${project.version}</version>
<injections>
<injection>
<site>https://download.eclipse.org/rcptt/milestone/2.5.5/MO/repository</site>
</injection>
</injections>
</aut>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Element-Type: testcase
Element-Version: 3.0
External-Reference:
Id: _aun7gLi1EeehOsYlOJ_Nog
Runtime-Version: 2.5.2.202109092356
Save-Time: 10/6/21, 6:10 PM
Runtime-Version: 2.5.5.202312181455
Save-Time: 4/8/24, 4:18 PM
Testcase-Type: ecl

------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Expand Down Expand Up @@ -49,7 +49,7 @@ with [get-view "Fast Linker" | get-canvas] {
mouse-move 410 206 -height 226 -width 412
mouse-exit 412 211 -height 226 -width 412
}
get-view Search | get-link "'#091;PAB#093; #035; Physical System' - 11 matches in workspace"
| get-property caption | equals "'&&#091;PAB&&#093; &&#035; Physical System' - 11 matches in workspace"
get-view Search | get-link "'#091;PAB#093; #035; Physical System' - 17 matches in workspace"
| get-property caption | equals "'&&#091;PAB&&#093; &&#035; Physical System' - 17 matches in workspace"
| verify-true
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.polarsys.capella.studio.releng.aggregator.tests.rcptt</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2006, 2021 THALES GLOBAL SERVICES.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0
SPDX-License-Identifier: EPL-2.0
Contributors:
Thales - initial API and implementation
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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.polarsys.capella</groupId>
<artifactId>org.polarsys.capella.studio.releng.aggregator.tests.rcptt</artifactId>
<packaging>pom</packaging>

<name>Capella Studio RCPTT tests Aggregator Module </name>

<parent>
<groupId>org.polarsys.capella</groupId>
<artifactId>org.polarsys.capella.studio</artifactId>
<version>7.0.0-SNAPSHOT</version>
<relativePath>../org.polarsys.capella.studio.releng.parent</relativePath>
</parent>

<licenses>
<license>
<name>Eclipse Public License v2.0</name>
<comments>
This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0

SPDX-License-Identifier: EPL-2.0
</comments>
</license>
</licenses>

<modules>
<!-- Plugin Tests RCPTT Capella Studio -->
<module>../../../extension/tests/org.polarsys.capella.extension.rcptt</module>
<module>../../../gendoc/tests/org.polarsys.capella.gen.doc.tests</module>
<module>../../../vpdsl/tests/org.polarsys.capella.studio.ad.viewpoint.rcptt</module>
<module>../../../vpdsl/tests/capellastudio.vpdsl.qualityassessment.tests</module>
<module>../../../vpdsl/tests/capellastudio.vpdsl.qualityassessment.reverse.tests</module>
</modules>
</project>

36 changes: 13 additions & 23 deletions releng/plugins/org.polarsys.capella.studio.releng.parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<prerequisites>
<maven>3.3</maven>
</prerequisites>

<name>Capella Studio</name>

<groupId>org.polarsys.capella</groupId>
Expand Down Expand Up @@ -53,18 +48,16 @@

<sonar.jacoco.release>0.8.10</sonar.jacoco.release>

<rcptt-maven-version>2.5.4</rcptt-maven-version>
<rcptt-kitalpha-components-site>https://download.eclipse.org/kitalpha/updates/stable/component/7.0.0.20230607/</rcptt-kitalpha-components-site>
<rcptt-maven-version>2.5.5-MO</rcptt-maven-version>
<rcptt-kitalpha-components-site>https://download.eclipse.org/kitalpha/updates/stable/component/7.0.0.20240319/</rcptt-kitalpha-components-site>

<capellastudio-product-id>org.polarsys.capella.studio.product.CapellaStudio</capellastudio-product-id>
<capellastudio-application>org.polarsys.capella.studio.product.application</capellastudio-application>
<target-platform-name>capellastudio</target-platform-name>
</properties>
<profiles>
<profile>
<id>full</id>
<properties>
<target-platform-name>capellastudio</target-platform-name>
</properties>
<modules>
<!-- module TP -->
<module>../org.polarsys.capella.studio.releng.targets</module>
Expand Down Expand Up @@ -140,9 +133,6 @@
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<target-platform-name>capellastudio</target-platform-name>
</properties>
<modules>
<module>../../../releng/plugins/org.polarsys.capella.studio.releng.product</module>
</modules>
Expand All @@ -156,6 +146,15 @@
<module>../org.polarsys.capella.studio.releng.aggregator.tests</module>
</modules>
</profile>
<profile>
<id>rcptt</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<modules>
<module>../org.polarsys.capella.studio.releng.aggregator.tests.rcptt</module>
</modules>
</profile>
</profiles>
<build>
<sourceDirectory>src</sourceDirectory>
Expand Down Expand Up @@ -195,18 +194,9 @@
<groupId>org.polarsys.capella</groupId>
<artifactId>org.polarsys.capella.studio.releng.targets</artifactId>
<version>7.0.0-SNAPSHOT</version>
<classifier>../../../releng/plugins/org.polarsys.capella.studio.releng.targets/${target-platform-name}</classifier>
<classifier>../org.polarsys.capella.studio.releng.targets/${target-platform-name}</classifier>
</artifact>
</target>
<dependency-resolution>
<extraRequirements>
<requirement>
<type>p2-installable-unit</type>
<id>org.polarsys.capella.rcp</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ openFile
<programArgsLin>--launcher.GTK_version
2
</programArgsLin>
<vmArgs>-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms512m
<vmArgs>-Dosgi.requiredJavaVersion=17
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms512m
-Xmx2048m
-XX:PermSize=256M
-XX:-UseGCOverheadLimit
</vmArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
</vmArgsMac>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="capellastudio" sequenceNumber="1695814372">
<target name="capellastudio" sequenceNumber="1712654650">
<locations>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.gmf.runtime.notation.sdk.feature.group" version="0.0.0"/>
Expand All @@ -10,13 +10,13 @@
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.gmf.runtime.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.gmf.runtime.thirdparty.feature.group" version="0.0.0"/>
<repository id="GMF-Runtime-1.15.3" location="https://download.eclipse.org/modeling/gmp/gmf-runtime/updates/releases/R202211041032/"/>
<repository id="GMF-Runtime-1.16.3" location="https://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S202401081627/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.gef.feature.group" version="0.0.0"/>
<unit id="org.eclipse.gef.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.draw2d.sdk.feature.group" version="0.0.0"/>
<repository id="GEF-Classic" location="https://download.eclipse.org/tools/gef/classic/releases/3.15.0"/>
<repository id="GEF-Classic" location="https://download.eclipse.org/tools/gef/classic/releases/3.17.0"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.cvs.feature.group" version="0.0.0"/>
Expand Down Expand Up @@ -60,8 +60,8 @@
<unit id="org.eclipse.sirius.samples.feature.group" version="0.0.0"/>
<unit id="org.eclipse.sirius.specifier.properties.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.sirius.specifier.feature.group" version="0.0.0"/>
<unit id="org.eclipse.sirius.tests.junit.support" version="7.2.0.202306070701"/>
<repository id="sirius" location="https://download.eclipse.org/sirius/updates/releases/7.2.0/2023-03"/>
<unit id="org.eclipse.sirius.tests.junit.support" version="7.4.1.202403190821"/>
<repository id="sirius" location="https://download.eclipse.org/sirius/updates/stable/7.4.1-S20240319-042018/2023-03"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.emf.diffmerge.feature.feature.group" version="0.0.0"/>
Expand Down Expand Up @@ -100,7 +100,7 @@
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.egf.sdk.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.egf.sdk.feature.source.feature.group" version="0.0.0"/>
<repository id="EGFSdk" location="https://download.eclipse.org/egf/updates/stable/1.6.4/2023-03/"/>
<repository id="EGFSdk" location="https://download.eclipse.org/egf/updates/1.6.4/2023-03/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.nebula.widgets.richtext.feature.feature.group" version="0.0.0"/>
Expand Down Expand Up @@ -334,11 +334,11 @@
<unit id="org.polarsys.capella.core.advance.feature.source.feature.group" version="0.0.0"/>
<unit id="org.polarsys.capella.core.feature.feature.group" version="0.0.0"/>
<unit id="org.polarsys.capella.core.feature.source.feature.group" version="0.0.0"/>
<repository id="capella" location="https://download.eclipse.org/capella/core/updates/nightly/master/org.polarsys.capella.rcp.site/"/>
<repository id="capella" location="https://download.eclipse.org/capella/core/updates/stable/7.0.0-S20240320//org.polarsys.capella.rcp.site/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.polarsys.capella.test.feature.feature.group" version="7.0.0.202309270929"/>
<repository id="capella-tests" location="https://download.eclipse.org/capella/core/updates/nightly/master/org.polarsys.capella.test.site"/>
<unit id="org.polarsys.capella.test.feature.feature.group" version="7.0.0.202403200912"/>
<repository id="capella-tests" location="https://download.eclipse.org/capella/core/updates/stable/7.0.0-S20240320/org.polarsys.capella.test.site"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.polarsys.capella.docgen.feature.source.feature.group" version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*******************************************************************************/
target "capellastudio" with source, requirements

include "https://download.eclipse.org/kitalpha/updates/stable/runtime/7.0.0.20230926/targets/kitalpha.targetplatform"
include "https://download.eclipse.org/kitalpha/updates/stable/runtime/7.0.0.20240319/targets/kitalpha.targetplatform"

location sirius-query-legacy-1.1.0 "https://download.eclipse.org/sirius/updates/legacy/1.1.0" {
org.eclipse.sirius.query.legacy.feature.feature.group lazy
Expand Down Expand Up @@ -156,7 +156,7 @@ location capella-egf-patterns "https://download.eclipse.org/capella/core/updates
org.polarsys.capella.core.egf.feature.source.feature.group lazy
}

location capella "https://download.eclipse.org/capella/core/updates/nightly/master/org.polarsys.capella.rcp.site/" {
location capella "https://download.eclipse.org/capella/core/updates/stable/7.0.0-S20240320//org.polarsys.capella.rcp.site/" {
org.polarsys.capella.rcp.feature.group lazy
org.polarsys.capella.rcp.source.feature.group lazy
org.polarsys.capella.cdo.mock.feature.feature.group lazy
Expand All @@ -168,7 +168,7 @@ location capella "https://download.eclipse.org/capella/core/updates/nightly/mast
org.polarsys.capella.core.feature.source.feature.group lazy
}

location capella-tests "https://download.eclipse.org/capella/core/updates/nightly/master/org.polarsys.capella.test.site" {
location capella-tests "https://download.eclipse.org/capella/core/updates/stable/7.0.0-S20240320/org.polarsys.capella.test.site" {
org.polarsys.capella.test.feature.feature.group
}

Expand Down

0 comments on commit 2f225b3

Please sign in to comment.