Skip to content

Commit

Permalink
[560509] Organize update sites master (#7)
Browse files Browse the repository at this point in the history
- Make sure to have copyrights on installation page via
updatesite
- Add more than one category for addon update
site
- Bump version
- Add multibranch pipeline configuration

Signed-off-by: Tu Ton <minhtutonthat@gmail.com>
Co-authored-by: Ali AKAR <ali.akar82@gmail.com>
  • Loading branch information
minhtutonthat and aliakar82 authored Mar 24, 2020
1 parent d8645b6 commit c9ce0a3
Show file tree
Hide file tree
Showing 2 changed files with 159 additions and 8 deletions.
153 changes: 153 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
pipeline {
agent {
label 'migration'
}

tools {
maven 'apache-maven-latest'
jdk 'oracle-jdk8-latest'
}

environment {
BUILD_KEY = (github.isPullRequest() ? CHANGE_TARGET : BRANCH_NAME).replaceFirst(/^v/, '')
CAPELLA_PRODUCT_PATH = "${WORKSPACE}/capella/capella"
}

stages {

stage('Generate Target Platform') {
steps {
script {
if(github.isPullRequest()){
github.buildStartedComment()
}

currentBuild.description = BUILD_KEY

sh 'env'
sh 'mvn clean verify -f releng/org.polarsys.capella.vp.requirements.target/pom.xml'
}
}
}

stage('Build and Package') {
steps {
script {
def customParams = github.isPullRequest() ? '-DSKIP_SONAR=true' : '-Psign'

sh "mvn -Djacoco.skip=true -DjavaDocPhase=none ${customParams} clean package -f pom.xml"
}
}
}

stage('Deploy to Nightly') {
steps {
script {
def deploymentDirName =
(github.isPullRequest() ? "${BUILD_KEY}-${BRANCH_NAME}-${BUILD_ID}" : "${BRANCH_NAME}-${BUILD_ID}")
.replaceAll('/','-')

deployer.addonNightlyDropins("${WORKSPACE}/releng/org.polarsys.capella.vp.requirements.site/target/*-dropins-*.zip", deploymentDirName)
deployer.addonNightlyUpdateSite("${WORKSPACE}/releng/org.polarsys.capella.vp.requirements.site/target/*-updateSite-*.zip", deploymentDirName)

}
}
}

stage('Download Capella') {
when {
expression {
github.isPullRequest()
}
}

steps {
script {
def capellaURL = capella.getDownloadURL("${BUILD_KEY}", 'linux', '')

sh "curl -k -o capella.zip ${capellaURL}"
sh "unzip -q capella.zip"

}
}
}

stage('Install test features') {
when {
expression {
github.isPullRequest()
}
}

steps {
script {
sh "chmod 755 ${CAPELLA_PRODUCT_PATH}"

eclipse.installFeature("${CAPELLA_PRODUCT_PATH}", 'http://download.eclipse.org/tools/orbit/downloads/drops/R20130827064939/repository', 'org.jsoup')
eclipse.installFeature("${CAPELLA_PRODUCT_PATH}", capella.getTestUpdateSiteURL("${BUILD_KEY}"), 'org.polarsys.capella.test.feature.feature.group')

eclipse.installFeature("${CAPELLA_PRODUCT_PATH}", "file:/${WORKSPACE}/releng/org.polarsys.capella.vp.requirements.site/target/repository/".replace("\\", "/"), 'org.polarsys.capella.vp.requirements.feature.feature.group')
eclipse.installFeature("${CAPELLA_PRODUCT_PATH}", "file:/${WORKSPACE}/releng/org.polarsys.capella.vp.requirements.site/target/repository/".replace("\\", "/"), 'org.polarsys.capella.vp.requirements.tests.feature.feature.group')
}
}
}

stage('Run tests') {
when {
expression {
github.isPullRequest()
}
}

steps {
script {
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) {

tester.runUITests("${CAPELLA_PRODUCT_PATH}", 'RequirementsTestSuite', 'org.polarsys.capella.vp.requirements.ju',
['org.polarsys.capella.vp.requirements.ju.testsuites.RequirementsTestSuite'])
}

junit '*.xml'
}
}
}
}

post {
always {
archiveArtifacts artifacts: '**/*.log, *.log, *.xml, **/*.layout'
}

success {
script {
if(github.isPullRequest()){
github.buildSuccessfullComment()
}
}
}

unstable {
script {
if(github.isPullRequest()){
github.buildUnstableComment()
}
}
}

failure {
script {
if(github.isPullRequest()){
github.buildFailedComment()
}
}
}

aborted {
script {
if(github.isPullRequest()){
github.buildAbortedComment()
}
}
}
}
}
14 changes: 6 additions & 8 deletions releng/org.polarsys.capella.vp.requirements.site/category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,21 @@
<description url="http://www.polarsys.org/capella">
Capella Requirements Viewpoint
</description>
<feature id="org.polarsys.capella.vp.requirements.feature" version="0.11.1.qualifier">
<category name="org.polarsys.capella.vp.requirements"/>
</feature>
<feature id="org.polarsys.capella.vp.requirements.feature.source" version="0.11.1.qualifier">
<category name="org.polarsys.capella.vp.requirements.source"/>
</feature>
<feature id="org.polarsys.capella.vp.requirements.cdo.feature" version="0.11.1.qualifier">
<category name="org.polarsys.capella.vp.requirements"/>
</feature>
<feature id="org.polarsys.capella.vp.requirements.cdo.feature.source" version="0.11.1.qualifier">
<category name="org.polarsys.capella.vp.requirements.collaboration"/>
</feature>
<feature url="features/org.polarsys.kitalpha.vp.requirements.docgen.feature" id="org.polarsys.kitalpha.vp.requirements.docgen.feature" version="0.11.1.qualifier">
<category name="org.polarsys.capella.vp.requirements"/>
<category name="org.polarsys.capella.vp.requirements.docgen"/>
</feature>
<feature id="org.polarsys.capella.vp.requirements.tests.feature" version="0.11.1.qualifier">
<category name="org.polarsys.capella.vp.requirements.tests"/>
</feature>
<category-def name="org.polarsys.capella.vp.requirements" label="Capella Requirements Viewpoint"/>
<category-def name="org.polarsys.capella.vp.requirements.source" label="Capella Requirements Viewpoint SDK"/>
<category-def name="org.polarsys.capella.vp.requirements.collaboration" label="Capella Requirements Viewpoint Collaboration"/>
<category-def name="org.polarsys.capella.vp.requirements.tests" label="Capella Requirements Viewpoint Tests"/>
<category-def name="org.polarsys.capella.vp.requirements.docgen" label="Capella Requirements Viewpoint DocGen"/>
<repository-reference location="http://download.eclipse.org/diffmerge/releases/0.1.0/edm-coevolution-site" enabled="true" />
</site>

0 comments on commit c9ce0a3

Please sign in to comment.