forked from apache/cassandra-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Java Driver CI job dsl, and its ubuntu2204_java_driver_testing…
… docker image patch by Siyao (Jane) He; reviewed by Mick Semb Wever for CASSANDRA-19832
- Loading branch information
1 parent
ff3b3c8
commit 8ea262a
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM ubuntu:22.04 | ||
MAINTAINER Apache Cassandra <[email protected]> | ||
|
||
RUN export DEBIAN_FRONTEND=noninteractive && \ | ||
apt update && \ | ||
apt install -y curl git virtualenv software-properties-common vim maven sudo && \ | ||
add-apt-repository -y ppa:deadsnakes/ppa && \ | ||
apt update | ||
|
||
# set up python 3.9 | ||
RUN DEBIAN_FRONTEND=nointeractive apt install -y python3.9 | ||
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 | ||
|
||
# add user | ||
RUN useradd -rm -d /home/docker -s /bin/bash -g root -G sudo -u 1000 -p "$(openssl passwd -1 docker)" docker | ||
RUN echo "docker ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | ||
|
||
USER docker | ||
|
||
WORKDIR /home/docker | ||
|
||
# install jabba and java versions | ||
RUN export JABBA_HOME="$HOME/.jabba" && \ | ||
curl -sL https://github.com/Jabba-Team/jabba/raw/main/install.sh | bash && . /home/docker/.jabba/jabba.sh | ||
|
||
RUN . /home/docker/.jabba/jabba.sh && jabba install [email protected] | ||
RUN . /home/docker/.jabba/jabba.sh && jabba install [email protected] | ||
RUN . /home/docker/.jabba/jabba.sh && jabba install openjdk@17 | ||
|
||
ENV PATH="/home/docker/.jabba/bin:/home/docker/.local/bin:$PATH" | ||
|
||
RUN echo "export JAVA8_HOME=$(jabba which [email protected])" >> ~/env.txt && \ | ||
echo "export JAVA11_HOME=$(jabba which [email protected])" >> ~/env.txt && \ | ||
echo "export JAVA17_HOME=$(jabba which openjdk@17)" >> ~/env.txt && \ | ||
echo "export JAVA_HOME=$(jabba which [email protected])" >> ~/env.txt && \ | ||
echo ". $HOME/.jabba/jabba.sh" >> ~/env.txt && \ | ||
echo "jabba use [email protected]" >> ~/env.txt | ||
|
||
# ccm | ||
RUN git clone https://github.com/riptano/ccm.git && \ | ||
cd ccm && \ | ||
pip install -e . | ||
|
||
ENTRYPOINT [ "/bin/bash", "-l", "-c" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters