Skip to content
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

Remove unzip sdk in pingPerf #4395

Merged
merged 1 commit into from
Mar 6, 2023
Merged
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
29 changes: 28 additions & 1 deletion external/criu/pingPerf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,42 @@ prepare() {
cd ci.docker || exit
git checkout instanton

# replace commands in openLiberty dockerfile
# replace commands in openLiberty dockerfile to use JDK from the pipeline
# https://github.com/OpenLiberty/ci.docker/blob/instanton/releases/latest/beta-instanton/Dockerfile.ubi.openjdk17

libertyDockerfilePath="releases/latest/beta-instanton/Dockerfile.ubi.openjdk17"

# before:
# curl -LfsSo /tmp/openjdk.tar.xz ${BINARY_URL}; \
# echo "${ESUM} */tmp/openjdk.tar.xz" | sha256sum -c -; \
# mkdir -p /opt/java/openjdk; \
# cd /opt/java/openjdk; \
# tar -xf /tmp/openjdk.tar.xz --strip-components=1; \
# rm -rf /tmp/openjdk.tar.xz;

# after:
# mkdir -p /opt/java/openjdk; \
# cd /opt/java/openjdk; \
# rm -rf /tmp/openjdk.tar.xz;
# COPY NEWJDK/ /opt/java/openjdk

# delete line: curl -LfsSo /tmp/openjdk.tar.xz ${BINARY_URL};
sed -i '/curl -LfsSo \/tmp\/openjdk.tar.xz ${BINARY_URL};/d' $libertyDockerfilePath
# delete line: echo "${ESUM} */tmp/openjdk.tar.xz" | sha256sum -c -;
sed -i '/echo "\${ESUM} \*\/tmp\/openjdk.tar.xz" \| sha256sum -c -;/d' $libertyDockerfilePath


# delete line: ENV JAVA_VERSION jdk-17.0.4.1+1
sed -i "s:ENV JAVA_VERSION jdk-17.0.4.1+1: :" $libertyDockerfilePath
# add line: RUN /opt/java/openjdk/bin/java --version
sed -i '/USER 1001.*/a RUN \/opt\/java\/openjdk\/bin\/java --version' $libertyDockerfilePath

commandToRemove='tar -xf /tmp/openjdk.tar.xz --strip-components=1; \\'
commandAfterRemovedOne="rm -rf /tmp/openjdk.tar.xz;"
attachCommand="COPY NEWJDK/ /opt/java/openjdk"
# replace line tar -xf rm -rf /tmp/openjdk.tar.xz; with line COPY NEWJDK/ /opt/java/openjdk
sed -i "s:$commandAfterRemovedOne:$attachCommand:" $libertyDockerfilePath
# replace line tar -xf /tmp/openjdk.tar.xz --strip-components=1; with line rm -rf /tmp/openjdk.tar.xz;
sed -i "s:$commandToRemove:$commandAfterRemovedOne:" $libertyDockerfilePath

mkdir releases/latest/beta-instanton/NEWJDK
Expand Down