From e95701dec04de03b7440c30cd2cae8a79b3ccd33 Mon Sep 17 00:00:00 2001 From: Alexander Fedorov Date: Wed, 22 May 2024 19:58:34 +0300 Subject: [PATCH] [#1361] Rework ci jobs to support stable P2 repository structure Switch to standardized publishing --- Jenkinsfile | 62 +++++- pom.xml | 1 + releng/org.eclipse.passage.parent/pom.xml | 36 +--- .../category.xml | 183 ++++++++++++++++++ sites/org.eclipse.passage.repository/pom.xml | 136 +++++++++++++ 5 files changed, 384 insertions(+), 34 deletions(-) create mode 100644 sites/org.eclipse.passage.repository/category.xml create mode 100644 sites/org.eclipse.passage.repository/pom.xml diff --git a/Jenkinsfile b/Jenkinsfile index 9193e9526..c69f9fc40 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 { diff --git a/pom.xml b/pom.xml index 25be2ed3d..41a503536 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,7 @@ ./releng/org.eclipse.passage.lbc.aggregator ./releng/org.eclipse.passage.ldc.aggregator ./releng/org.eclipse.passage.demo.aggregator + sites diff --git a/releng/org.eclipse.passage.parent/pom.xml b/releng/org.eclipse.passage.parent/pom.xml index 378edf105..11a32fd02 100644 --- a/releng/org.eclipse.passage.parent/pom.xml +++ b/releng/org.eclipse.passage.parent/pom.xml @@ -408,22 +408,9 @@ - production - - - PACK_AND_SIGN - true - - + sign - - org.eclipse.tycho - target-platform-configuration - - true - - org.eclipse.cbi.maven.plugins eclipse-jarsigner-plugin @@ -431,28 +418,15 @@ sign + + post-integration-test sign - verify - - - - - org.eclipse.tycho - tycho-p2-plugin - - - p2-metadata - - p2-metadata - - verify - - false - diff --git a/sites/org.eclipse.passage.repository/category.xml b/sites/org.eclipse.passage.repository/category.xml new file mode 100644 index 000000000..c15538025 --- /dev/null +++ b/sites/org.eclipse.passage.repository/category.xml @@ -0,0 +1,183 @@ + + + + + + Passage Licensing Integration Components includes: Licensing Runtime API and its implementation for Eclipse Equinox, Licensing JFace components, Licensing Metadata EMF API, License Management Integrations + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + + + + + + Passage Licensing Back-end Components: + OSGi-based server to manage licensing data" + + + + + + + + Passage Licensing Back-end Components Developer Resources: + OSGi-based server to manage licensing data" + + + + + + + + Passage Licensing Definition Components: + Eclipse PDE integration" + + + + + + + + Passage Licensing Definition Components Developer Resources: + Eclipse PDE integration" + + + + + + + + Passage Licensing Operator Components includes: Dashboard, EMF Forms editors, operator services + + + + + + + + + + + + + + Passage Licensing Operator Components Developer Resources includes: Dashboard, EMF Forms editors, operator services + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sites/org.eclipse.passage.repository/pom.xml b/sites/org.eclipse.passage.repository/pom.xml new file mode 100644 index 000000000..c514bdab1 --- /dev/null +++ b/sites/org.eclipse.passage.repository/pom.xml @@ -0,0 +1,136 @@ + + + + 4.0.0 + + org.eclipse.passage.repository + eclipse-repository + Eclipse Passage Update Site + + + org.eclipse.passage + org.eclipse.passage.parent + 3.0.0-SNAPSHOT + ../../releng/org.eclipse.passage.parent + + + + https://download.eclipse.org/releases/2023-06 + + https://download.eclipse.org/justj/tools/updates/nightly/latest + genie.passage + + -remote + ${org.eclipse.storage.user}@projects-storage.eclipse.org:/home/data/httpd/download.eclipse.org/passage + + updates + http://www.example.com/ + unknown + nightly + + + + + promote + + + + org.eclipse.tycho.extras + tycho-eclipserun-plugin + ${tycho-version} + + JavaSE-17 + + + org.eclipse.justj.p2 + eclipse-plugin + + + org.apache.felix.scr + eclipse-plugin + + + + + eclipse.repo + p2 + ${eclipse.repo} + + + justj.tools.repo + p2 + ${justj.tools.repo} + + + + + + promote + + eclipse-run + + package + + + + -consoleLog + -application + org.eclipse.justj.p2.manager + -data @None + -nosplash + ${org.eclipse.justj.p2.manager.args} + -retain 5 + -label "Passage" + -build-url + ${org.eclipse.justj.p2.manager.build.url} + -root + ${project.build.directory}/passage-sync + -relative + ${org.eclipse.justj.p2.manager.relative} + -version-iu + org.eclipse.passage.ldc.feature. + -iu-filter-pattern + org.eclipse.passage.nothingtofilter.*|org.eclipse.passage.justtohaveanexample.* + -excluded-categories-pattern .*\.Default + -commit + https://github.com/eclipse-passage/passage/commit/${git.commit} + -target-url + https://download.eclipse.org/passage + -promote + ${project.build.directory}/repository + -timestamp ${build.timestamp} + -type ${build.type} + -breadcrumb "Passage + https://www.eclipse.org/passage" + -favicon + https://github.com/eclipse-passage/passage-images/blob/master/images/org.eclipse.passage.loc.operator/png/icons/48.png + -xtitle-image + https://www.eclipse.org/jetty/common/images/jetty-logo.svg + -body-image + https://github.com/eclipse-passage/passage-images/blob/master/images/org.eclipse.passage.loc.operator/png/icons/128.png + ${org.eclipse.justj.p2.manager.extra.args} + + + + + + + + + + + \ No newline at end of file