Skip to content

Commit

Permalink
Add CI image for JDK 11
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwartzentruber committed Oct 24, 2024
1 parent cef96f3 commit 0944069
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 1 deletion.
18 changes: 18 additions & 0 deletions services/ci-java-11/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

FROM debian:stable-slim

LABEL maintainer Jesse Schwartzentruber <[email protected]>

ARG DEBIAN_FRONTEND=noninteractive

COPY recipes/linux /src/recipes
COPY services/ci-java-11/setup.sh /src/recipes/setup.sh
COPY services/orion-decision /src/orion-decision

RUN /src/recipes/setup.sh

USER worker
WORKDIR /home/worker
3 changes: 3 additions & 0 deletions services/ci-java-11/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: ci-java-11
force_dirty:
- orion-decision
49 changes: 49 additions & 0 deletions services/ci-java-11/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

set -e
set -x
set -o pipefail

# shellcheck source=recipes/linux/common.sh
source "${0%/*}/common.sh"

#### Bootstrap Packages

sys-update
apt-install-auto \
ca-certificates \
curl \
gpg \
gpg-agent \
lsb-release

retry-curl https://apt.corretto.aws/corretto.key | gpg --dearmor -o /etc/apt/keyrings/corretto.gpg
echo "deb [signed-by=/etc/apt/keyrings/corretto.gpg] https://apt.corretto.aws stable main" > /etc/apt/sources.list.d/corretto.list
sys-update

mkdir /opt/maven
retry-curl https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz | tar -C /opt/maven --strip-components=1 -xz
echo "PATH=\$PATH:/opt/maven/bin" >> /etc/bash.bashrc
echo ". /etc/environment" >> /etc/bash.bashrc

#### Install recipes

sys-embed \
git \
java-11-amazon-corretto-jdk \
openssh-client \
pipx

PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install /src/orion-decision

"${0%/*}/worker.sh"
mkdir /home/worker/.ssh
retry ssh-keyscan github.com > /home/worker/.ssh/known_hosts

chown -R worker:worker /home/worker
chmod 0777 /src

"${0%/*}/cleanup.sh"
4 changes: 3 additions & 1 deletion services/orion-decision/src/orion_decision/ci_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@

from . import Taskcluster

LANGUAGES = ["node", "python"]
LANGUAGES = ["java", "node", "python"]
PLATFORMS = ["linux", "windows", "macos"]
VERSIONS = {
("java", "linux"): ["11"],
("node", "linux"): ["14", "16", "18", "20"],
("python", "linux"): ["3.9", "3.10", "3.11", "3.12"],
("python", "windows"): ["3.9", "3.10", "3.11", "3.12"],
("python", "macos"): ["3.9", "3.10", "3.11", "3.12"],
}
IMAGES = {
("java", "linux", "11"): "ci-java-11",
("node", "linux", "14"): "ci-node-14",
("node", "linux", "16"): "ci-node-16",
("node", "linux", "18"): "ci-node-18",
Expand Down

0 comments on commit 0944069

Please sign in to comment.