Skip to content

Commit f52bb6a

Browse files
committed
Support building JDK 21; update CodeQL CLI to 2.15.5
1 parent 6529679 commit f52bb6a

7 files changed

+21
-18
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && apt-get -y instal
2020
libfontconfig1-dev
2121

2222
# Install boot JDK
23-
ARG BOOT_JDK_URL="https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.2+7/OpenJDK19U-jdk_x64_linux_hotspot_19.0.2_7.tar.gz"
23+
ARG BOOT_JDK_URL="https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1+12/OpenJDK21U-jdk_x64_linux_hotspot_21.0.1_12.tar.gz"
2424
RUN apt-get -y install ca-certificates \
2525
&& wget --no-verbose "${BOOT_JDK_URL}" --output-document=boot-jdk.tar.gz \
2626
&& mkdir boot-jdk \
@@ -29,7 +29,7 @@ RUN apt-get -y install ca-certificates \
2929
&& rm boot-jdk.tar.gz
3030

3131
# Set up CodeQL CLI
32-
ARG CODEQL_CLI_VERSION=2.12.6
32+
ARG CODEQL_CLI_VERSION=2.15.5
3333
RUN apt-get -y install ca-certificates \
3434
&& wget --no-verbose "https://github.com/github/codeql-cli-binaries/releases/download/v${CODEQL_CLI_VERSION}/codeql-linux64.zip" --output-document=codeql-linux64.zip \
3535
&& unzip -q -d codeql-cli codeql-linux64.zip \
@@ -40,4 +40,4 @@ RUN apt-get -y install ca-certificates \
4040
COPY ./docker_scripts/* ./docker_scripts/
4141

4242
ENTRYPOINT ["./docker_scripts/create_database.sh"]
43-
CMD ["--jdk-git-repo", "https://github.com/openjdk/jdk20u"]
43+
CMD ["--jdk-git-repo", "https://github.com/openjdk/jdk21u"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This project provides convenience scripts for creating a CodeQL database for the
2121
- Windows: [`build_database.cmd`](./build_database.cmd)
2222
- Linux: [`build_database.sh`](./build_database.sh)
2323

24-
At the moment they use CodeQL CLI 2.12.6 and build a Java database for the latest <https://github.com/openjdk/jdk20u> commit.
24+
At the moment they use CodeQL CLI 2.15.5 and build a Java database for the latest <https://github.com/openjdk/jdk21u> commit.
2525

2626
The scripts only build the Linux variant of the JDK, building the Windows variant is currently not supported.
2727

jdk-versions/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ This directory contains convenience build scripts for creating databases for the
55
- `jdk8u`: Cloned from [adoptium/jdk8u](https://github.com/adoptium/jdk8u)
66
- `jdk11u`: Cloned from [openjdk/jdk11u](https://github.com/openjdk/jdk11u)
77
- `jdk17u`: Cloned from [openjdk/jdk17u](https://github.com/openjdk/jdk17u)
8-
- _latest release_: Cloned from [openjdk/jdk20u](https://github.com/openjdk/jdk20u)
8+
- `jdk21u`: Cloned from [openjdk/jdk21u](https://github.com/openjdk/jdk21u)
9+
<!--
10+
- _latest release_: Cloned from [openjdk/jdk22u](https://github.com/openjdk/jdk22u)
11+
-->
912

1013
The build scripts support the command line arguments for tweaking build performance, as [specified by the README](/README.md#build-configuration).
1114

jdk-versions/jdk-21-linux.cmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@REM Create output directory; abort if directory cannot be created (e.g. when file with this name exists)
2+
IF NOT EXIST "databases/" mkdir databases || EXIT 1
3+
4+
@REM Build image, then start container (with `--rm` to remove it once finished)
5+
docker build .. -t codeql-jdk:21-linux --build-arg BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1+12/OpenJDK21U-jdk_x64_linux_hotspot_21.0.1_12.tar.gz && docker container run --rm --name "codeql-jdk-21-linux-db-build" --mount type=bind,source="%cd%/databases",target=/codeql-jdk/codeql-jdk-databases codeql-jdk:21-linux --jdk-git-repo https://github.com/openjdk/jdk21u --jdk-version-name 21-linux %*

jdk-versions/jdk-21-linux.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Create output directory
5+
mkdir -p databases
6+
# Build image, then start container (with `--rm` to remove it once finished)
7+
docker build .. -t codeql-jdk:21-linux --build-arg BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1+12/OpenJDK21U-jdk_x64_linux_hotspot_21.0.1_12.tar.gz
8+
docker container run --rm --name "codeql-jdk-21-linux-db-build" --mount type=bind,source="$(pwd)/databases",target=/codeql-jdk/codeql-jdk-databases codeql-jdk:21-linux --jdk-git-repo https://github.com/openjdk/jdk21u --jdk-version-name 21-linux "$@"

jdk-versions/jdk-latest(20)-linux.cmd

Lines changed: 0 additions & 5 deletions
This file was deleted.

jdk-versions/jdk-latest(20)-linux.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)