Skip to content

Update build settings for changes to JIPP as a result of recent LTS update #860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions documentation/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Items at the beginning of development
- [ ] Check [CHANGELOG.md](https://github.com/eclipse-lsp4j/lsp4j/blob/main/CHANGELOG.md) is up to date. The changelog should have a version entry, release date, API Breakages and other information consistent with current entries in the changelog.
- [ ] Check [README.md](https://github.com/eclipse-lsp4j/lsp4j/blob/main/README.md) is up to date. In particular that the planned release and which versions of DAP and LSP are support is listed.
- [ ] Increment version of all feature.xml, pom.xml and any other place full version is used. (Easiest way is global find and replace, e.g. `s/0.23.0/0.24.0/g`, `s/0.22.0/0.23.0/g` and review changes.) Ensure that `-SNAPSHOT` is restored in the [gradle/versions.gradle](https://github.com/eclipse-lsp4j/lsp4j/blob/main/gradle/versions.gradle) and [releng/pom.xml](https://github.com/eclipse-lsp4j/lsp4j/blob/main/releng/pom.xml)
- [ ] Enable `sh './releng/deploy-build.sh'` in [releng/build.Jenkinsfile](https://github.com/eclipse-lsp4j/lsp4j/blob/main/releng/build.Jenkinsfile)
- [ ] Enable `cd releng && ./deploy-build.sh'` in [releng/build.Jenkinsfile](https://github.com/eclipse-lsp4j/lsp4j/blob/main/releng/build.Jenkinsfile)
- [ ] Ensure [the CI build](https://ci.eclipse.org/lsp4j/job/lsp4j-multi-build/job/main/) is stable - it is always better to release a "Green Dot" build

Items in the days ahead of Release day:
Expand All @@ -30,7 +30,7 @@ Items on Release day:
- [ ] Prepare the repo for release by:
- [ ] removing `-SNAPSHOT` from [gradle/versions.gradle](https://github.com/eclipse-lsp4j/lsp4j/blob/main/gradle/versions.gradle)
- [ ] removing `-SNAPSHOT` from [releng/pom.xml](https://github.com/eclipse-lsp4j/lsp4j/blob/main/releng/pom.xml) entries in `<dependencies>` section.
- [ ] disabling `sh './releng/deploy-build.sh'` in [releng/build.Jenkinsfile](https://github.com/eclipse-lsp4j/lsp4j/blob/main/releng/build.Jenkinsfile)
- [ ] disabling `cd releng && ./deploy-build.sh'` in [releng/build.Jenkinsfile](https://github.com/eclipse-lsp4j/lsp4j/blob/main/releng/build.Jenkinsfile)
- see commit https://github.com/eclipse-lsp4j/lsp4j/commit/328ce8a4c89b0cd84fb62118f459b6cf79b09e90 for a past example
- [ ] Push the above change
- [ ] Run [the CI build](https://ci.eclipse.org/lsp4j/job/lsp4j-multi-build/job/main/)
Expand Down
4 changes: 2 additions & 2 deletions releng/build.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pipeline {
agent {
kubernetes {
// See comment in deplog-build.sh (gpg:sign-and-deploy-file)
inheritFrom 'centos-7'
inheritFrom 'ubuntu-2404'
}
}
tools {
Expand Down Expand Up @@ -73,7 +73,7 @@ pipeline {
// XXX: Can release vs snapshot be detected automatically so that
// the following line does not have to be commented/uncommented
// on each change to/from SNAPSHOT?
sh './releng/deploy-build.sh'
sh 'cd releng && ./deploy-build.sh'
}
}
}
Expand Down
20 changes: 9 additions & 11 deletions releng/deploy-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ set -e # error out on any failed commands
set -x # echo all commands used for debugging purposes


# This script is expected to be run with CWD of ./releng so that when maven runs below
# with the -f flag the CWD of Maven is the same as the rest of ths script.

SSHUSER="[email protected]"
SSH="ssh ${SSHUSER}"
SCP="scp"
Expand All @@ -21,7 +24,7 @@ if $SSH test -e ${DOWNLOAD_MOUNT}-last; then
$SSH rm -r ${DOWNLOAD_MOUNT}-last
fi
$SSH mkdir -p ${DOWNLOAD_MOUNT}-new
$SCP -rp build/p2-repository/* "${SSHUSER}:"${DOWNLOAD_MOUNT}-new
$SCP -rp ../build/p2-repository/* "${SSHUSER}:"${DOWNLOAD_MOUNT}-new
if $SSH test -e ${DOWNLOAD_MOUNT}; then
$SSH mv ${DOWNLOAD_MOUNT} ${DOWNLOAD_MOUNT}-last
fi
Expand All @@ -31,18 +34,13 @@ $SSH mv ${DOWNLOAD_MOUNT}-new ${DOWNLOAD_MOUNT}
case $BRANCH_NAME in
main | release_*)
# GPG Sign and Deploy to Maven Central snapshot
find build/maven-repository -name '*.pom' | while read i
find ../build/maven-repository -name '*.pom' | while read i
do
base="${i%.*}"
# The centos-7 agent is used because it provides gpg 2.0.x
# and we sign for OSSRH with gpg maven plug-in run at the command
# line.
# If a newer GPG version (> 2.1+) is used,
# --pinentry-mode loopback needs to be added as gpg argument in the pom.xml.
# If centos changes we may need to add the gpg arguments to some pom.xml
# somewhere
mvn -X \
org.apache.maven.plugins:maven-gpg-plugin:1.6:sign-and-deploy-file \
# See https://wiki.eclipse.org/Jenkins#How_can_artifacts_be_deployed_to_OSSRH_.2F_Maven_Central.3F for more info
# on the Eclipse Foundation specific settings.
mvn -X -f gpgparameters.pom \
org.apache.maven.plugins:maven-gpg-plugin:3.2.7:sign-and-deploy-file \
-DpomFile=${base}.pom \
-Dfile=${base}.jar \
-Dfiles=${base}-sources.jar,${base}-javadoc.jar \
Expand Down
30 changes: 30 additions & 0 deletions releng/gpgparameters.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.eclipse.lsp4j</groupId>
<artifactId>gpgparameters</artifactId>
<version>0.24.0-SNAPSHOT</version>
<packaging>pom</packaging>

<!--
This file is used to pass command line parameters to GPG because there is no user
property that can be used. See depoy-build.sh
-->

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
</plugins>
</build>
</project>
2 changes: 1 addition & 1 deletion releng/release-eclipse.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pipeline {
agent {
kubernetes {
// See comment in release-eclipse.sh (gpg:sign-and-deploy-file)
inheritFrom 'centos-7'
inheritFrom 'ubuntu-2404'
}
}
tools {
Expand Down
Loading