Fabio Ponciroli | cf4985a | 2019-11-12 10:27:04 -0800 | [diff] [blame] | 1 | FROM denvazh/gatling:3.2.1 |
| 2 | |
Marco Miller | afa08d7 | 2020-03-27 15:28:48 -0400 | [diff] [blame] | 3 | ARG gatling_git_version=1.0.10 |
Fabio Ponciroli | cf4985a | 2019-11-12 10:27:04 -0800 | [diff] [blame] | 4 | RUN apk add --no-cache maven |
| 5 | RUN mvn dependency:get \ |
| 6 | -DgroupId=com.gerritforge \ |
| 7 | -DartifactId=gatling-git_2.12 \ |
| 8 | -Dversion=$gatling_git_version \ |
| 9 | -Dtype=pom |
| 10 | RUN mvn dependency:copy-dependencies \ |
| 11 | -f /root/.m2/repository/com/gerritforge/gatling-git_2.12/$gatling_git_version/gatling-git_2.12-$gatling_git_version.pom \ |
| 12 | -DoutputDirectory=/opt/gatling/lib/ |
| 13 | RUN mvn dependency:get \ |
| 14 | -Dartifact=com.gerritforge:gatling-git_2.12:$gatling_git_version:jar \ |
| 15 | -Ddest=/opt/gatling/lib/gatling-git.jar |
| 16 | |
| 17 | ARG gatling_home=/home/gatling |
| 18 | RUN addgroup -g 1000 -S appgroup && \ |
| 19 | adduser -u 1000 -S gatling -G appgroup -h $gatling_home |
| 20 | RUN cp -R /opt/gatling/* $gatling_home && \ |
| 21 | chown -R gatling:appgroup $gatling_home |
| 22 | |
| 23 | WORKDIR $gatling_home |
| 24 | USER gatling |
| 25 | |
| 26 | COPY ./src/test/scala/com/google/gerrit/scenarios $gatling_home/user-files/simulations |
| 27 | COPY ./src/test/resources/application.conf $gatling_home/conf |
| 28 | COPY ./src/test/resources/data $gatling_home/user-files/resources/data |
| 29 | |
| 30 | ENV GATLING_HOME=$gatling_home |
| 31 | |
| 32 | ENTRYPOINT ["/home/gatling/bin/gatling.sh"] |