Skip to content

Commit

Permalink
[#1361] Rework ci jobs to support stable P2 repository structure
Browse files Browse the repository at this point in the history
Switch to standardized publishing
  • Loading branch information
ruspl-afed committed May 22, 2024
1 parent 0eae78f commit 37ee113
Show file tree
Hide file tree
Showing 5 changed files with 384 additions and 34 deletions.
62 changes: 59 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,67 @@ pipeline {
maven 'apache-maven-latest'
jdk 'openjdk-jdk17-latest'
}
parameters {
choice(
name: 'BUILD_TYPE',
choices: ['nightly', 'milestone', 'release'],
description: '''
Choose the type of build.
Note that a release build will not promote the build, but rather will promote the most recent milestone build.
'''
)
booleanParam(
name: 'PROMOTE',
defaultValue: true,
description: 'Whether to promote the build to the download server.'
)
}
stages {
stage('Build') {
stage('Display Parameters') {
steps {
echo "BUILD_TYPE=${params.BUILD_TYPE}"
echo "PROMOTE=${params.PROMOTE}"
script {
env.BUILD_TYPE = params.BUILD_TYPE
if (env.BRANCH_NAME == 'main') {
if (params.PROMOTE) {
env.MAVEN_PROFILES = "-Psign -Ppromote"
} else {
env.MAVEN_PROFILES = "-Psign"
}
} else {
env.MAVEN_PROFILES = "-P baseline-check,coverage"
}
}
}
}
stage('Initialize PGP') {
steps {
withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING')]) {
sh 'gpg --batch --import "${KEYRING}"'
sh 'for fpr in $(gpg --list-keys --with-colons | awk -F: \'/fpr:/ {print $10}\' | sort -u); do echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust; done'
}
}
}
stage('Build Passage') {
steps {
wrap([$class: 'Xvnc', useXauthority: true]) {
sh 'mvn clean verify -B -P baseline-check,coverage -Dmaven.repo.local=$WORKSPACE/.m2/repository -Dmaven.test.failure.ignore=true -Dmaven.test.error.ignore=true -Ddash.fail=false'
sshagent (['projects-storage.eclipse.org-bot-ssh']) {
wrap([$class: 'Xvnc', useXauthority: true]) {
sh '''
mvn \
clean \
verify \
-B \
$MAVEN_PROFILES \
-Dmaven.repo.local=$WORKSPACE/.m2/repository \
-Dmaven.test.failure.ignore=true \
-Dmaven.test.error.ignore=true \
-Ddash.fail=false \
-Dorg.eclipse.justj.p2.manager.build.url=$JOB_URL \
-Dbuild.type=$BUILD_TYPE \
-Dgit.commit=$GIT_COMMIT
'''
}
}
}
post {
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<module>./releng/org.eclipse.passage.lbc.aggregator</module>
<module>./releng/org.eclipse.passage.ldc.aggregator</module>
<module>./releng/org.eclipse.passage.demo.aggregator</module>
<module>sites</module>
</modules>

</project>
36 changes: 5 additions & 31 deletions releng/org.eclipse.passage.parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -408,51 +408,25 @@
</profile>

<profile>
<id>production</id>
<activation>
<property>
<name>PACK_AND_SIGN</name>
<value>true</value>
</property>
</activation>
<id>sign</id>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<includePackedArtifacts>true</includePackedArtifacts>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.cbi.maven.plugins</groupId>
<artifactId>eclipse-jarsigner-plugin</artifactId>
<version>${cbi-plugins.version}</version>
<executions>
<execution>
<id>sign</id>
<!-- Eclipse jar-signing must occur before GPG
signing. Bind this plugin execution to a phase
just prior to to the GPG plugin execution. -->
<phase>post-integration-test</phase>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-plugin</artifactId>
<executions>
<execution>
<id>p2-metadata</id>
<goals>
<goal>p2-metadata</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
<configuration>
<defaultP2Metadata>false</defaultP2Metadata>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
183 changes: 183 additions & 0 deletions sites/org.eclipse.passage.repository/category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2019, 2024 ArSysOp and others
This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/.
SPDX-License-Identifier: EPL-2.0
Contributors:
ArSysOp - initial API and implementation
-->
<site>
<category-def
name="org.eclipse.passage.lic.category"
label="Passage LIC"
>
<description>
Passage Licensing Integration Components includes: Licensing Runtime API and its implementation for Eclipse Equinox, Licensing JFace components, Licensing Metadata EMF API, License Management Integrations
</description>
</category-def>
<feature
id="org.eclipse.passage.lic.compile.feature">
<category name="org.eclipse.passage.lic.category" />
</feature>
<feature
id="org.eclipse.passage.lic.execute.feature">
<category name="org.eclipse.passage.lic.category" />
</feature>
<feature
id="org.eclipse.passage.lic.define.feature">
<category name="org.eclipse.passage.lic.category" />
</feature>
<feature
id="org.eclipse.passage.lic.bc.feature">
<category name="org.eclipse.passage.lic.category" />
</feature>
<feature
id="org.eclipse.passage.lic.jetty.feature">
<category name="org.eclipse.passage.lic.category" />
</feature>

<category-def
name="org.eclipse.passage.lic.category.source"
label="Passage LIC Developer Resources"
>
<description>
Passage Licensing Integration Components Developer Resources includes: Licensing Runtime API and its implementation for Eclipse Equinox, Licensing JFace components, Licensing Metadata EMF API, License Management Integrations
</description>
</category-def>
<feature
id="org.eclipse.passage.lic.compile.feature.source">
<category name="org.eclipse.passage.lic.category.source" />
</feature>
<feature
id="org.eclipse.passage.lic.execute.feature.source">
<category name="org.eclipse.passage.lic.category.source" />
</feature>
<feature
id="org.eclipse.passage.lic.define.feature.source">
<category name="org.eclipse.passage.lic.category.source" />
</feature>
<feature
id="org.eclipse.passage.lic.bc.feature.source">
<category name="org.eclipse.passage.lic.category.source" />
</feature>
<feature
id="org.eclipse.passage.lic.jetty.feature.source">
<category name="org.eclipse.passage.lic.category.source" />
</feature>
<category-def
name="org.eclipse.passage.lbc.category"
label="Passage LBC">
<description>
Passage Licensing Back-end Components:
OSGi-based server to manage licensing data"
</description>
</category-def>
<feature
id="org.eclipse.passage.lbc.execute.feature">
<category name="org.eclipse.passage.lbc.category" />
</feature>
<category-def
name="org.eclipse.passage.lbc.category.source"
label="Passage LBC Developer Resources">
<description>
Passage Licensing Back-end Components Developer Resources:
OSGi-based server to manage licensing data"
</description>
</category-def>
<feature
id="org.eclipse.passage.lbc.execute.feature.source">
<category name="org.eclipse.passage.lbc.category.source" />
</feature>
<category-def
name="org.eclipse.passage.ldc.category"
label="Passage LDC">
<description>
Passage Licensing Definition Components:
Eclipse PDE integration"
</description>
</category-def>
<feature
id="org.eclipse.passage.ldc.feature">
<category name="org.eclipse.passage.ldc.category" />
</feature>
<category-def
name="org.eclipse.passage.ldc.category.source"
label="Passage LDC Developer Resources">
<description>
Passage Licensing Definition Components Developer Resources:
Eclipse PDE integration"
</description>
</category-def>
<feature
id="org.eclipse.passage.ldc.feature.source">
<category name="org.eclipse.passage.ldc.category.source" />
</feature>
<category-def
name="org.eclipse.passage.loc.category"
label="Passage LOC">
<description>
Passage Licensing Operator Components includes: Dashboard, EMF Forms editors, operator services
</description>
</category-def>
<feature
id="org.eclipse.passage.loc.dashboard.feature">
<category name="org.eclipse.passage.loc.category" />
</feature>
<feature
id="org.eclipse.passage.loc.operator.feature">
<category name="org.eclipse.passage.loc.category" />
</feature>
<feature
id="org.eclipse.passage.loc.billing.feature">
<category name="org.eclipse.passage.loc.category" />
</feature>
<category-def
name="org.eclipse.passage.loc.category.source"
label="Passage LOC Developer Resources">
<description>
Passage Licensing Operator Components Developer Resources includes: Dashboard, EMF Forms editors, operator services
</description>
</category-def>
<feature
id="org.eclipse.passage.loc.dashboard.feature.source">
<category name="org.eclipse.passage.loc.category.source" />
</feature>
<feature
id="org.eclipse.passage.loc.operator.feature.source">
<category name="org.eclipse.passage.loc.category.source" />
</feature>
<bundle id="bcpg" />
<bundle id="bcpg.source" />
<bundle id="bcpkix" />
<bundle id="bcpkix.source" />
<bundle id="bcprov" />
<bundle id="bcprov.source" />
<bundle id="bcutil" />
<bundle id="bcutil.source" />
<bundle id="com.fasterxml.jackson.core.jackson-annotations"/>
<bundle id="com.fasterxml.jackson.core.jackson-annotations.source"/>
<bundle id="com.fasterxml.jackson.core.jackson-core"/>
<bundle id="com.fasterxml.jackson.core.jackson-core.source"/>
<bundle id="com.fasterxml.jackson.core.jackson-databind"/>
<bundle id="com.fasterxml.jackson.core.jackson-databind.source"/>
<bundle id="com.github.oshi.oshi-core" />
<bundle id="com.github.oshi.oshi-core.source" />
<bundle id="com.sun.jna" />
<bundle id="com.sun.jna.source" />
<bundle id="com.sun.jna.platform" />
<bundle id="com.sun.jna.platform.source" />
<bundle id="jakarta.activation-api" />
<bundle id="jakarta.activation-api.source" />
<bundle id="jakarta.annotation-api" />
<bundle id="jakarta.annotation-api.source" />
<bundle id="jakarta.servlet-api" />
<bundle id="jakarta.servlet-api.source" />
<bundle id="slf4j.api" />
<bundle id="slf4j.api.source" />
<bundle id="slf4j.nop" />
<bundle id="slf4j.nop.source" />
</site>
Loading

0 comments on commit 37ee113

Please sign in to comment.