-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[releng] Fix build download IFE sample and use pipeline for promotion
- Loading branch information
Showing
4 changed files
with
70 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,12 @@ pipeline { | |
JACOCO_VERSION = "0.8.6" | ||
MVN_QUALITY_PROFILES = '-P full' | ||
JACOCO_EXEC_FILE_PATH = '${WORKSPACE}/jacoco.exec' | ||
BUILD_KEY = (github.isPullRequest() ? CHANGE_TARGET : BRANCH_NAME).replaceFirst(/^v/, '') | ||
} | ||
stages { | ||
stage('Generate TP') { | ||
steps { | ||
sh 'mvn verify -e -f releng/org.polarsys.capella.docgen.target/pom.xml' | ||
sh 'mvn verify -e -f releng/org.polarsys.capella.docgen.target/pom.xml' | ||
} | ||
} | ||
|
||
|
@@ -31,52 +32,59 @@ pipeline { | |
} | ||
} | ||
stage('Deploy') { | ||
when { | ||
not { changeRequest() } | ||
steps { | ||
script { | ||
def deploymentDirName = | ||
(github.isPullRequest() ? "${BUILD_KEY}-${BRANCH_NAME}-${BUILD_ID}" : "${BRANCH_NAME}-${BUILD_ID}") | ||
.replaceAll('/','-') | ||
|
||
deployer.addonNightlyDropins("${WORKSPACE}/releng/org.polarsys.capella.docgen.site/target/*-dropins-*.zip", deploymentDirName) | ||
deployer.addonNightlyUpdateSite("${WORKSPACE}/releng/org.polarsys.capella.docgen.site/target/repository/*", deploymentDirName) | ||
deployer.addonNightlyUpdateSite("${WORKSPACE}/releng/org.polarsys.capella.docgen.site/target/*-updateSite-*.zip", deploymentDirName) | ||
|
||
currentBuild.description = "${deploymentDirName} - <a href=\"https://download.eclipse.org/capella/addons/xhtmldocgen/dropins/nightly/${deploymentDirName}\">drop-in</a> - <a href=\"https://download.eclipse.org/capella/addons/xhtmldocgen/updates/nightly/${deploymentDirName}\">update-site</a>" | ||
} | ||
} | ||
} | ||
stage('Deploy as nightly') { | ||
steps { | ||
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) { | ||
script { | ||
def VERSION = BRANCH_NAME | ||
if (VERSION.matches("v\\d\\.\\d\\.x")) { | ||
VERSION = VERSION.substring(1) | ||
} | ||
|
||
def DEST_UPDATESITE_DIR='/home/data/httpd/download.eclipse.org/capella/addons/xhtmldocgen/updates/nightly/'+VERSION | ||
def DEST_DROPINS_DIR='/home/data/httpd/download.eclipse.org/capella/addons/xhtmldocgen/dropins/nightly/'+VERSION | ||
script { | ||
def nightlyDirName = | ||
(github.isPullRequest() ? "${BUILD_KEY}-${BRANCH_NAME}" : "${BRANCH_NAME}") | ||
.replaceAll('/','-') | ||
deployer.cleanAddonNightlyArtefacts(nightlyDirName) | ||
deployer.addonNightlyDropins("${WORKSPACE}/releng/org.polarsys.capella.docgen.site/target/*-dropins-*.zip", nightlyDirName) | ||
deployer.addonNightlyUpdateSite("${WORKSPACE}/releng/org.polarsys.capella.docgen.site/target/repository/*", nightlyDirName) | ||
deployer.addonNightlyUpdateSite("${WORKSPACE}/releng/org.polarsys.capella.docgen.site/target/*-updateSite-*.zip", nightlyDirName) | ||
} | ||
} | ||
} | ||
stage('Run tests') { | ||
steps { | ||
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) { | ||
script { | ||
// Retrieve the IFE sample from capella repository | ||
checkout([$class: 'GitSCM', | ||
branches: [[name: '*/master']], | ||
extensions: [[$class: 'SparseCheckoutPaths', sparseCheckoutPaths: [[path: 'samples']]], | ||
[$class: 'RelativeTargetDirectory', relativeTargetDir: 'capella']], | ||
userRemoteConfigs: [[credentialsId: '0dea5761-867c-44db-92fa-9304c81a8653', url: 'https://github.com/eclipse/capella']] | ||
]) | ||
|
||
sh "echo 'deploy update site'" | ||
sh "ssh [email protected] rm -rf ${DEST_UPDATESITE_DIR}" | ||
sh "ssh [email protected] mkdir -p ${DEST_UPDATESITE_DIR}" | ||
sh "scp -r releng/org.polarsys.capella.docgen.site/target/repository/* [email protected]:${DEST_UPDATESITE_DIR}" | ||
|
||
sh "echo 'deploy product'" | ||
sh "ssh [email protected] rm -rf ${DEST_DROPINS_DIR}" | ||
sh "ssh [email protected] mkdir -p ${DEST_DROPINS_DIR}" | ||
sh "scp -r releng/org.polarsys.capella.docgen.site/target/*-dropins-*.zip [email protected]:${DEST_DROPINS_DIR}" | ||
sh "cp -r capella/samples/In-Flight\\ Entertainment\\ System/* \"tests/plugins/org.polarsys.capella.docgen.test.ju/model/In-Flight Entertainment System/\"" | ||
|
||
// Launch test | ||
sh 'mvn -Dmaven.test.failure.ignore=true -Dtycho.localArtifacts=ignore integration-test -P tests -e -f pom.xml' | ||
} | ||
} | ||
} | ||
} | ||
stage('Run tests') { | ||
steps { | ||
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) { | ||
script { | ||
// Retrieve the IFE sample from capella repository | ||
sh "git clone --filter=blob:none --no-checkout -b master --sparse \"https://github.com/eclipse/capella.git\" capella; cd capella; git sparse-checkout add samples; git checkout; cd .." | ||
sh "cp capella/samples/In-Flight\\ Entertainment\\ System/* \"tests/plugins/org.polarsys.capella.docgen.test.ju/model/In-Flight Entertainment System/\"" | ||
|
||
// Launch test | ||
sh 'mvn -Dmaven.test.failure.ignore=true -Dtycho.localArtifacts=ignore integration-test -P tests -e -f pom.xml' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
stage('Publish results') { | ||
steps { | ||
junit allowEmptyResults: true, testResults: '*.xml,**/target/surefire-reports/*.xml' | ||
sh "mvn -Djacoco.dataFile=$JACOCO_EXEC_FILE_PATH org.jacoco:jacoco-maven-plugin:$JACOCO_VERSION:report $MVN_QUALITY_PROFILES -e -f pom.xml" | ||
} | ||
archiveArtifacts artifacts: 'tests/**/*.ser' | ||
} | ||
} | ||
stage('Perform Sonar analysis') { | ||
environment { | ||
|
22 changes: 11 additions & 11 deletions
22
tests/plugins/org.polarsys.capella.docgen.test.ju/.classpath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-14"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
28 changes: 14 additions & 14 deletions
28
tests/plugins/org.polarsys.capella.docgen.test.ju/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=14 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=14 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | ||
org.eclipse.jdt.core.compiler.release=enabled | ||
org.eclipse.jdt.core.compiler.source=14 | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=11 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | ||
org.eclipse.jdt.core.compiler.release=enabled | ||
org.eclipse.jdt.core.compiler.source=11 |
Binary file modified
BIN
+258 KB
(100%)
...t.ju/model/In-Flight Entertainment System/In-Flight Entertainment System.test_results.ser
Binary file not shown.