-
Notifications
You must be signed in to change notification settings - Fork 11
JICMP-27: Compile with OpenJDK 17 #7
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
base: master
Are you sure you want to change the base?
Changes from all commits
af30b03
79d3e42
39fbd45
000c433
4f29186
28ebb81
5c894c4
781dd5b
35454ab
3d68c35
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,32 @@ | ||
| --- | ||
| version: 2.1 | ||
|
|
||
| orbs: | ||
| cloudsmith: cloudsmith/cloudsmith@1.0.5 | ||
| sign-packages: opennms/sign-packages@3.0.0 | ||
| sign-packages: opennms/sign-packages@3.0.1 | ||
|
|
||
| parameters: | ||
| debian-version: | ||
| type: string | ||
| default: buster | ||
| default: bookworm | ||
| maven-version: | ||
| type: string | ||
| default: 3.6.3 | ||
| default: 3.8.9 | ||
| # use the oldest version | ||
| xcode-version: | ||
| type: string | ||
| default: 11.7.0 | ||
| default: 26.2.0 | ||
|
|
||
| executors: | ||
| java-executor: | ||
| docker: | ||
| - image: cimg/openjdk:8.0 | ||
| - image: cimg/openjdk:17.0 | ||
| package-executor: | ||
| machine: | ||
| image: ubuntu-2004:current | ||
| image: ubuntu-2404:current | ||
| debian-executor: | ||
| docker: | ||
| - image: opennms/build-env:debian-jdk8 | ||
| - image: opennms/build-env:circleci-ubuntu-jdk17-b10832 | ||
|
|
||
| commands: | ||
| cache-restore: | ||
|
|
@@ -131,19 +132,13 @@ commands: | |
| fi | ||
|
|
||
| sudo apt -q update | ||
| sudo apt -y -q install gnupg2 software-properties-common | ||
|
|
||
| echo "deb http://deb.debian.org/debian << pipeline.parameters.debian-version >>-backports main" | sudo tee /etc/apt/sources.list.d/<< pipeline.parameters.debian-version >>-backports.list | ||
| echo "deb http://deb.debian.org/debian-security << pipeline.parameters.debian-version >>/updates main" | sudo tee /etc/apt/sources.list.d/<< pipeline.parameters.debian-version >>-security.list | ||
| sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138 0E98404D386FA1D9 AA8E81B4331F7F50 112695A0E562B32A | ||
| sudo apt -q update | ||
| sudo apt -y -q -t << pipeline.parameters.debian-version >>-backports install apt-transport-https ca-certificates | ||
| sudo apt -y -q install gnupg2 software-properties-common apt-transport-https ca-certificates | ||
| - cache-restore: | ||
| key: debian-<< parameters.type >> | ||
| path: /var/cache/apt | ||
| - run: | ||
| name: download jdk | ||
| command: sudo apt -y --download-only -q -t << pipeline.parameters.debian-version >>-backports install openjdk-8-jdk-headless | ||
| command: sudo apt -y --download-only -q install openjdk-17-jdk-headless | ||
| - run: | ||
| name: download other dependencies | ||
| command: sudo apt -y --download-only -q install autotools-dev autoconf automake cdbs curl debhelper debianutils devscripts dpkg-dev git software-properties-common | ||
|
|
@@ -152,7 +147,10 @@ commands: | |
| path: /var/cache/apt | ||
| - run: | ||
| name: install jdk | ||
| command: sudo apt -y -q -t << pipeline.parameters.debian-version >>-backports install openjdk-8-jdk-headless | ||
| command: | | ||
| sudo rm -rf /etc/ssl/certs/java/cacerts | ||
| sudo update-ca-certificates | ||
| sudo apt -y -q install openjdk-17-jdk-headless | ||
| - run: | ||
| name: install other dependencies | ||
| command: sudo apt -y -q install autotools-dev autoconf automake cdbs curl debhelper debianutils devscripts dpkg-dev git software-properties-common | ||
|
|
@@ -257,28 +255,22 @@ commands: | |
| parameters: | ||
| platform: | ||
| type: enum | ||
| enum: ["arm32v7", "arm64v8", "i386", "amd64"] | ||
| enum: ["arm64v8", "amd64"] | ||
| steps: | ||
| - run: | ||
| name: build << parameters.platform >> | ||
| command: | | ||
| case "<< parameters.platform >>" in | ||
| arm32v7) | ||
| PLATFORM="linux/arm/v7" | ||
| ;; | ||
| arm64) | ||
| PLATFORM="linux/arm64" | ||
| ;; | ||
| i386) | ||
| PLATFORM="linux/i386" | ||
| ;; | ||
| amd64) | ||
| PLATFORM="linux/amd64" | ||
| ;; | ||
| esac | ||
|
Comment on lines
263
to
270
|
||
| set | grep CIRCLE > /tmp/build-env.txt | ||
| docker run --rm --privileged tonistiigi/binfmt:latest --install all | ||
| docker run --env-file /tmp/build-env.txt --rm -it --platform "${PLATFORM}" -v "$(pwd):/workdir" -w /workdir "<< parameters.platform >>/debian:buster" ./build-all.sh "<< parameters.platform >>" | ||
| docker run --env-file /tmp/build-env.txt --rm -it --platform "${PLATFORM}" -v "$(pwd):/workdir" -w /workdir "<< parameters.platform >>/debian:bookworm" ./build-all.sh "<< parameters.platform >>" | ||
|
|
||
| jobs: | ||
| build-from-source: | ||
|
|
@@ -338,13 +330,14 @@ jobs: | |
| - attach_workspace: | ||
| at: ~/ | ||
| - run: | ||
| name: install OpenJDK 8 | ||
| name: install OpenJDK 17 | ||
| command: | | ||
| HOMEBREW_NO_AUTO_UPDATE=1 brew install "openjdk@8" | ||
| sudo ln -sfn /usr/local/opt/openjdk@8/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-8.jdk | ||
| HOMEBREW_NO_AUTO_UPDATE=1 brew install "openjdk@17" | ||
| sudo ln -sfn /usr/local/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk | ||
| - run: | ||
| name: configure and build | ||
| command: | | ||
| export JAVA_HOME="$(/usr/libexec/java_home -v 17)" | ||
| export PATH="$HOME/maven/bin:$PATH" | ||
| ./configure | ||
| make | ||
|
|
@@ -399,15 +392,9 @@ jobs: | |
| steps: | ||
| - attach_workspace: | ||
| at: ~/ | ||
| - fetch-artifacts: | ||
| path: ~/artifacts/rpm/ | ||
| location: arm32v7-rpm | ||
| - fetch-artifacts: | ||
| path: ~/artifacts/rpm/ | ||
| location: arm64v8-rpm | ||
| - fetch-artifacts: | ||
| path: ~/artifacts/rpm/ | ||
| location: i386-rpm | ||
| - fetch-artifacts: | ||
| path: ~/artifacts/rpm/ | ||
| location: amd64-rpm | ||
|
|
@@ -418,42 +405,28 @@ jobs: | |
| sudo apt-get -y install gnupg2 rpm | ||
| - sign-packages/setup-env: | ||
| gnupg_home: ~/tmp/gpg | ||
| - run: | ||
| name: prepare artifacts | ||
| command: | | ||
| cd ~ | ||
| mkdir -p artifacts/rpm-signed/ | ||
| find artifacts/rpm -name \*.rpm | while read -r INFILE; do | ||
| OUTFILE="$(echo "$INFILE" | sed -e 's,artifacts/rpm,artifacts/rpm-signed,g')" | ||
| docker run -v `pwd`:/workspace -w /workspace opennms/rpm-add-checksum -- "${INFILE}" "${OUTFILE}" | ||
| done | ||
| - sign-packages/sign-rpms: | ||
| gnupg_home: ~/tmp/gpg | ||
| gnupg_key: opennms@opennms.org | ||
| packages: ~/artifacts/rpm-signed/*.rpm | ||
| packages: ~/artifacts/rpm/*.rpm | ||
| - save-artifacts: | ||
| path: ~/artifacts/rpm-signed | ||
| location: rpm-signed | ||
| path: ~/artifacts/rpm | ||
| location: rpm | ||
|
|
||
| sign-debs: | ||
| executor: debian-executor | ||
| resource_class: small | ||
| steps: | ||
| - attach_workspace: | ||
| at: ~/ | ||
| - fetch-artifacts: | ||
| path: ~/artifacts/deb | ||
| location: arm32v7-deb | ||
| - fetch-artifacts: | ||
| path: ~/artifacts/deb | ||
| location: arm64v8-deb | ||
| - fetch-artifacts: | ||
| path: ~/artifacts/deb | ||
| location: i386-deb | ||
| - fetch-artifacts: | ||
| path: ~/artifacts/deb | ||
| location: amd64-deb | ||
| - sign-packages/install-deb-dependencies | ||
| - sign-packages/install-deb-dependencies: | ||
| use_sudo: true | ||
| - sign-packages/setup-env: | ||
| gnupg_home: ~/tmp/gpg | ||
| - sign-packages/sign-debs: | ||
|
|
@@ -496,8 +469,8 @@ jobs: | |
| - attach_workspace: | ||
| at: ~/ | ||
| - fetch-artifacts: | ||
| path: ~/artifacts/rpm-signed | ||
| location: rpm-signed | ||
| path: ~/artifacts/rpm | ||
| location: rpm | ||
| - fetch-artifacts: | ||
| path: ~/artifacts/debian-signed | ||
| location: debian-signed | ||
|
|
@@ -508,43 +481,19 @@ jobs: | |
| cloudsmith-repository: << parameters.target_repository >> | ||
| package-format: rpm | ||
| package-distribution: any-distro/any-version | ||
| package-path: ~/artifacts/rpm-signed/jicmp-*.armv7hl.rpm | ||
| - cloudsmith/publish: | ||
| allow-republish: true | ||
| cloudsmith-repository: << parameters.target_repository >> | ||
| package-format: rpm | ||
| package-distribution: any-distro/any-version | ||
| package-path: ~/artifacts/rpm-signed/jicmp-*.aarch64.rpm | ||
| - cloudsmith/publish: | ||
| allow-republish: true | ||
| cloudsmith-repository: << parameters.target_repository >> | ||
| package-format: rpm | ||
| package-distribution: any-distro/any-version | ||
| package-path: ~/artifacts/rpm-signed/jicmp-*.i686.rpm | ||
| package-path: ~/artifacts/rpm/jicmp-*.aarch64.rpm | ||
| - cloudsmith/publish: | ||
| allow-republish: true | ||
| cloudsmith-repository: << parameters.target_repository >> | ||
| package-format: rpm | ||
| package-distribution: any-distro/any-version | ||
| package-path: ~/artifacts/rpm-signed/jicmp-*.x86_64.rpm | ||
| - cloudsmith/publish: | ||
| allow-republish: true | ||
| cloudsmith-repository: << parameters.target_repository >> | ||
| package-format: deb | ||
| package-distribution: any-distro/any-version | ||
| package-path: ~/artifacts/debian-signed/jicmp_*_armhf.deb | ||
| package-path: ~/artifacts/rpm/jicmp-*.x86_64.rpm | ||
| - cloudsmith/publish: | ||
| allow-republish: true | ||
| cloudsmith-repository: << parameters.target_repository >> | ||
| package-format: deb | ||
| package-distribution: any-distro/any-version | ||
| package-path: ~/artifacts/debian-signed/jicmp_*_arm64.deb | ||
| - cloudsmith/publish: | ||
| allow-republish: true | ||
| cloudsmith-repository: << parameters.target_repository >> | ||
| package-format: deb | ||
| package-distribution: any-distro/any-version | ||
| package-path: ~/artifacts/debian-signed/jicmp_*_i386.deb | ||
| - cloudsmith/publish: | ||
| allow-republish: true | ||
| cloudsmith-repository: << parameters.target_repository >> | ||
|
|
@@ -554,7 +503,7 @@ jobs: | |
|
|
||
| build-docs: | ||
| docker: | ||
| - image: cimg/openjdk:8.0-node | ||
| - image: cimg/openjdk:17.0-node | ||
| resource_class: small | ||
| steps: | ||
| - fetch-maven | ||
|
|
@@ -586,7 +535,7 @@ jobs: | |
|
|
||
| publish-docs: | ||
| docker: | ||
| - image: cimg/openjdk:8.0-node | ||
| - image: cimg/openjdk:17.0-node | ||
| resource_class: small | ||
| steps: | ||
| - checkout | ||
|
|
@@ -634,7 +583,7 @@ workflows: | |
| matrix: | ||
| alias: build-packages-arm | ||
| parameters: | ||
| platform: ["arm32v7", "arm64v8"] | ||
| platform: ["arm64v8"] | ||
| resource: ["arm.medium"] | ||
| requires: | ||
| - build-from-source | ||
|
|
@@ -645,7 +594,7 @@ workflows: | |
| matrix: | ||
| alias: build-packages-intel | ||
| parameters: | ||
| platform: ["i386","amd64"] | ||
| platform: ["amd64"] | ||
| resource: ["medium"] | ||
| requires: | ||
| - build-from-source | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,3 +67,5 @@ package-lock.json | |
| /win32/ipch | ||
| /win32/Release | ||
| /win32/x86 | ||
|
|
||
| .idea/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,12 +46,11 @@ java-classes: java.built | |
|
|
||
| java.built: $(JAVA_FILES) pom.xml | ||
| -mkdir -p $(classdir) | ||
| $(JAVAC) $(JAVACFLAGS) -source $(JAVA_TARGET_VERSION) -target $(JAVA_TARGET_VERSION) -d $(classdir) $(JAVA_FILES) && touch java.built | ||
| $(JAVAC) $(JAVACFLAGS) --release $(JAVA_TARGET_VERSION) -h . -d $(classdir) $(JAVA_FILES) && touch java.built | ||
|
|
||
| IcmpSocket.c: org_opennms_protocols_icmp_IcmpSocket.h | ||
|
|
||
| org_opennms_protocols_icmp_IcmpSocket.h: java.built | ||
| $(JAVAH) -classpath $(classdir) org.opennms.protocols.icmp.IcmpSocket | ||
|
|
||
|
Comment on lines
47
to
54
|
||
| jicmp.jar: java.built | ||
| cd $(classdir) && \ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,9 +34,10 @@ apt-get -y --no-install-recommends install \ | |
| software-properties-common \ | ||
| wget | ||
|
|
||
| apt-add-repository --yes 'deb http://archive.debian.org/debian-security stretch/updates main' | ||
| apt-get update | ||
| apt-get -y install openjdk-8-jdk-headless | ||
| rm -rf /etc/ssl/certs/java/cacerts | ||
| update-ca-certificates | ||
| apt-get -y install openjdk-17-jdk-headless | ||
|
Comment on lines
37
to
+40
|
||
|
|
||
| # build tarball and binaries from source | ||
| make clean >/dev/null 2>&1 || : | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debian-versionis defined as a pipeline parameter but is no longer referenced anywhere in this config. This can confuse future changes (e.g., expectingdo-docker-buildto honor it). Either remove the unused parameter or wire it back in (for example, use it when selecting the Debian base image/tag).