-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve and simplify the releng infrastructure
- Loading branch information
Showing
1,040 changed files
with
4,409 additions
and
3,534 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
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 |
---|---|---|
|
@@ -10,3 +10,5 @@ target/ | |
class/ | ||
*.class | ||
.metadata/ | ||
releng/org.eclipse.nebula.site/updates/ | ||
build.log |
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,7 +1,7 @@ | ||
<extensions> | ||
<extension> | ||
<groupId>org.eclipse.tycho.extras</groupId> | ||
<artifactId>tycho-pomless</artifactId> | ||
<version>2.5.0</version> | ||
</extension> | ||
<extension> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-build</artifactId> | ||
<version>4.0.4</version> | ||
</extension> | ||
</extensions> |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>org.eclipse.nebula</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
</buildSpec> | ||
<natures> | ||
</natures> | ||
<filteredResources> | ||
<filter> | ||
<id>1707305303744</id> | ||
<name></name> | ||
<type>30</type> | ||
<matcher> | ||
<id>org.eclipse.ui.ide.multiFilter</id> | ||
<arguments>1.0-projectRelativePath-matches-true-true-(examples/org.eclipse.nebula.examples.*|widgets/(opal/)?[^/]+/org.eclipse.nebula.*|releng/org.eclipse.nebula.*)/.*</arguments> | ||
</matcher> | ||
</filter> | ||
</filteredResources> | ||
</projectDescription> |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=UTF-8 |
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 |
---|---|---|
@@ -0,0 +1,145 @@ | ||
pipeline { | ||
agent { | ||
label "centos-latest" | ||
} | ||
|
||
options { | ||
timeout(time: 60, unit: 'MINUTES') | ||
buildDiscarder(logRotator(numToKeepStr: '10')) | ||
disableConcurrentBuilds(abortPrevious: true) | ||
} | ||
|
||
tools { | ||
maven 'apache-maven-latest' | ||
jdk 'temurin-jdk17-latest' | ||
} | ||
|
||
environment { | ||
BUILD_TIMESTAMP = sh(returnStdout: true, script: 'date +%Y%m%d%H%M').trim() | ||
MAIN_BRANCH = 'master' | ||
} | ||
|
||
parameters { | ||
choice( | ||
name: 'BUILD_TYPE', | ||
choices: ['nightly', 'milestone', 'release'], | ||
description: ''' | ||
Choose the type of build. | ||
Note that a release build will <b>not</b> promote the build, but rather will promote the most recent milestone build. | ||
''' | ||
) | ||
|
||
booleanParam( | ||
name: 'ECLIPSE_SIGN', | ||
defaultValue: true, | ||
description: ''' | ||
Choose whether or not the bundles will be signed. | ||
This is relevant only for nightly and milestone builds. | ||
''' | ||
) | ||
|
||
booleanParam( | ||
name: 'PROMOTE', | ||
defaultValue: true, | ||
description: 'Whether to promote the build to the download server.' | ||
) | ||
} | ||
|
||
stages { | ||
stage('Display Parameters') { | ||
steps { | ||
script { | ||
env.BUILD_TYPE = params.BUILD_TYPE | ||
if (env.BRANCH_NAME == env.MAIN_BRANCH) { | ||
// Only sign the master branch. | ||
// | ||
env.ECLIPSE_SIGN = params.ECLIPSE_SIGN | ||
} else { | ||
// Do not sign PR builds. | ||
env.ECLIPSE_SIGN = false | ||
} | ||
|
||
// Only promote signed builds, i.e., do not sign or promote PR builds. | ||
// | ||
env.PROMOTE = params.PROMOTE && (env.ECLIPSE_SIGN == 'true') | ||
|
||
def description = """ | ||
BUILD_TIMESTAMP=${env.BUILD_TIMESTAMP} | ||
BUILD_TYPE=${env.BUILD_TYPE} | ||
ECLIPSE_SIGN=${env.ECLIPSE_SIGN} | ||
PROMOTE=${env.PROMOTE} | ||
BRANCH_NAME=${env.BRANCH_NAME} | ||
""".trim() | ||
echo description | ||
currentBuild.description = description.replace("\n", "<br/>") | ||
} | ||
} | ||
} | ||
|
||
stage('Build Nebula') { | ||
steps { | ||
script { | ||
if (env.PROMOTE == 'true') { | ||
// Only provide an agent context, which allows uploading to download.eclipse.org if we are promoting. | ||
// PR builds are not permitted to promote. | ||
// | ||
sshagent(['projects-storage.eclipse.org-bot-ssh']) { | ||
mvn() | ||
} | ||
} else { | ||
mvn() | ||
archiveArtifacts 'releng/org.eclipse.nebula.site/target/repository/**' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
post { | ||
always { | ||
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/*.xml' | ||
recordIssues publishAllIssues: true, tools: [java(), mavenConsole(), javaDoc()] | ||
} | ||
|
||
failure { | ||
archiveArtifacts '**' | ||
mail to: '[email protected]', | ||
subject: "[Nebula CI] Build Failure ${currentBuild.fullDisplayName}", | ||
mimeType: 'text/html', | ||
body: "Project: ${env.JOB_NAME}<br/>Build Number: ${env.BUILD_NUMBER}<br/>Build URL: ${env.BUILD_URL}<br/>Console: ${env.BUILD_URL}/console" | ||
} | ||
|
||
fixed { | ||
mail to: '[email protected]', | ||
subject: "[Nebula CI] Back to normal ${currentBuild.fullDisplayName}", | ||
mimeType: 'text/html', | ||
body: "Project: ${env.JOB_NAME}<br/>Build Number: ${env.BUILD_NUMBER}<br/>Build URL: ${env.BUILD_URL}<br/>Console: ${env.BUILD_URL}/console" | ||
} | ||
|
||
cleanup { | ||
deleteDir() | ||
} | ||
} | ||
} | ||
|
||
def void mvn() { | ||
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) { | ||
// Only promoted builds will be signed. | ||
// | ||
sh ''' | ||
if [[ $PROMOTE == true ]]; then | ||
promotion_argument='-Ppromote -Pbuild-server' | ||
fi | ||
mvn \ | ||
$promotion_argument \ | ||
--no-transfer-progress \ | ||
-Dproject.build.sourceEncoding=UTF-8 \ | ||
-Dbuild.id=${BUILD_TIMESTAMP} \ | ||
-Dgit.commit=$GIT_COMMIT \ | ||
-Dbuild.type=$BUILD_TYPE \ | ||
-Dorg.eclipse.justj.p2.manager.build.url=$JOB_URL \ | ||
clean \ | ||
verify | ||
''' | ||
} | ||
} |
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
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
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
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
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
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
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
Oops, something went wrong.