Created
October 8, 2024 23:47
-
-
Save luiarhs/431369daf0ab7618598155714f0dbb82 to your computer and use it in GitHub Desktop.
Jenkins agent that can run JMeter
This file contains hidden or 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
FROM jenkins/inbound-agent:latest-jdk11 | |
# Set environment variables | |
ENV JMETER_VERSION="5.6.2" \ | |
JMETER_HOME="/opt/apache-jmeter-${JMETER_VERSION}" \ | |
PATH="$JMETER_HOME/bin:$PATH" | |
USER root | |
RUN apt-get update && apt-get install -y \ | |
curl \ | |
wget \ | |
unzip \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN wget https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-${JMETER_VERSION}.tgz \ | |
&& tar -xvzf apache-jmeter-${JMETER_VERSION}.tgz -C /opt/ \ | |
&& rm apache-jmeter-${JMETER_VERSION}.tgz | |
USER jenkins | |
WORKDIR /home/jenkins | |
RUN java -version && jmeter -v | |
ENTRYPOINT ["jenkins-jmeter-agent"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment