Skip to content

Commit

Permalink
Move to tycho for building
Browse files Browse the repository at this point in the history
- Don't use eclipse p2 repo, as it's not needed. Allow optional signing of plugins, do that on CI builds.
- Remove old builder
  • Loading branch information
sgtcoolguy committed Feb 8, 2018
1 parent 7fc32b9 commit 652646f
Show file tree
Hide file tree
Showing 33 changed files with 315 additions and 293 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ plugins/com.aptana.ide.libraries.subscription/edtftpj-license.txt
plugins/com.aptana.ide.libraries.subscription/edtftpj-pro.jar
plugins/com.aptana.ide.libraries.subscription/license.jar
.pmd
target/
7 changes: 7 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<extensions>
<extension>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-pomless</artifactId>
<version>1.0.0</version>
</extension>
</extensions>
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.aptana.ide.libraries.subscription</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
56 changes: 34 additions & 22 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,43 @@
#! groovy
@Library('pipeline-build') _
// Keep logs/reports/etc of last 15 builds, only keep build artifacts of last 2 builds
properties([buildDiscarder(logRotator(numToKeepStr: '15', artifactNumToKeepStr: '2'))])

timestamps() {
node('edtftpjpro && linux && ant && eclipse && jdk') {
try {
stage('Checkout') {
checkout scm
}
timestamps {
// Need maven 3.3+
node('edtftpjpro && linux && eclipse && jdk') {
stage('Checkout') {
// checkout scm
// Hack for JENKINS-37658 - see https://support.cloudbees.com/hc/en-us/articles/226122247-How-to-Customize-Checkout-for-Pipeline-Multibranch
checkout([
$class: 'GitSCM',
branches: scm.branches,
extensions: scm.extensions + [[$class: 'CleanCheckout'], [$class: 'CloneOption', honorRefspec: true, noTags: true, reference: '', shallow: true, depth: 30, timeout: 30]],
userRemoteConfigs: scm.userRemoteConfigs
])
}

stage('Dependencies') {
sh 'cp -f $HOME/edtftpjpro/* $WORKSPACE/plugins/com.aptana.ide.libraries.subscription/'
}
stage('Dependencies') {
sh 'cp -f $HOME/edtftpjpro/* $WORKSPACE/bundles/com.aptana.ide.libraries.subscription/'
}

buildPlugin {
builder = 'com.aptana.ide.libraries.subscription.build'
stage('Build') {
withEnv(["PATH+MAVEN=${tool name: 'Maven 3.5.0', type: 'maven'}/bin"]) {
withCredentials([usernamePassword(credentialsId: 'aca99bee-0f1e-4fc5-a3da-3dfd73f66432', passwordVariable: 'STOREPASS', usernameVariable: 'ALIAS')]) {
sh "mvn -Djarsigner.keypass=${env.STOREPASS} -Djarsigner.storepass=${env.STOREPASS} -Djarsigner.keystore=${env.KEYSTORE} clean verify"
} // withCredentials
}

// If not a PR, trigger studio3-core build for same branch
if (!env.BRANCH_NAME.startsWith('PR-')) {
build job: "Studio/studio3/${env.BRANCH_NAME}", wait: false
dir('releng/com.aptana.ide.libraries.subscription.update/target') {
// FIXME: To keep backwards compatability with existing build pipeline, I probably need to make the "repository" dir be "dist"
archiveArtifacts artifacts: "repository/**/*"
def jarName = sh(returnStdout: true, script: 'ls repository/features/com.aptana.ide.feature.libraries.subscription_*.jar').trim()
def version = (jarName =~ /.*?_(.+)\.jar/)[0][1]
currentBuild.displayName = "#${version}-${currentBuild.number}"
}
} catch (e) {
// if any exception occurs, mark the build as failed
currentBuild.result = 'FAILURE'
throw e
} finally {
step([$class: 'WsCleanup', notFailBuild: true])
}

// If not a PR, trigger studio3-core build for same branch
if (!env.BRANCH_NAME.startsWith('PR-')) {
build job: "../studio3/${env.BRANCH_NAME}", wait: false
}
} // node
} // timestamps
Binary file not shown.
145 changes: 0 additions & 145 deletions builders/com.aptana.ide.libraries.subscription.build/build.xml

This file was deleted.

This file was deleted.

This file was deleted.

17 changes: 17 additions & 0 deletions bundles/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.aptana.ide.libraries.subscription.bundles</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
1 change: 1 addition & 0 deletions bundles/com.aptana.ide.libraries.subscription/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
Loading

0 comments on commit 652646f

Please sign in to comment.