-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatling_jenkins.sh
executable file
·32 lines (20 loc) · 1.36 KB
/
gatling_jenkins.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
CLASS=$1
GATLING_VERSION="2.1.7"
cd ${WORKSPACE}
# Remove old Gatling reports and version Download New
rm -rf ${WORKSPACE}/gatling-charts-highcharts-bundle-$GATLING_VERSION
curl -sf -o ${WORKSPACE}/gatling-$GATLING_VERSION.zip \
-L https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/$GATLING_VERSION/gatling-charts-highcharts-bundle-$GATLING_VERSION-bundle.zip
ls
unzip ${WORKSPACE}/gatling-$GATLING_VERSION.zip
chmod +x ${WORKSPACE}/gatling-charts-highcharts-bundle-$GATLING_VERSION/bin/gatling.sh
# Set GATLING_HOME
export GATLING_HOME=${WORKSPACE}/gatling-charts-highcharts-bundle-$GATLING_VERSION
# Remove default simulations & Config and add our own
rm -rf ${WORKSPACE}/gatling-charts-highcharts-bundle-$GATLING_VERSION/user-files/simulations/
rm -rf ${WORKSPACE}/gatling-charts-highcharts-bundle-$GATLING_VERSION/conf
cp ${WORKSPACE}/user-files/ ${WORKSPACE}/gatling-charts-highcharts-bundle-$GATLING_VERSION/user-files/
cp ${WORKSPACE}/conf ${WORKSPACE}/gatling-charts-highcharts-bundle-$GATLING_VERSION/conf/
# RUN Gatling TEST WITH CLASS CLASS/TEST SCENARIO SPECIFIED
sh ${WORKSPACE}/gatling-charts-highcharts-bundle-$GATLING_VERSION/bin/gatling.sh -sf ${WORKSPACE}/gatling-charts-highcharts-bundle-$GATLING_VERSION/user-files/simulations/ -s $CLASS -rf ${WORKSPACE}/gatling-charts-highcharts-bundle-$GATLING_VERSION/results/