Skip to content

Commit

Permalink
Merge branch 'master' of github.com:STAMP-project/camp
Browse files Browse the repository at this point in the history
  • Loading branch information
fchauvel committed Nov 6, 2019
2 parents 6ee94ee + 15ea0b2 commit 035eefc
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 22 deletions.
10 changes: 3 additions & 7 deletions samples/stamp/atos/functional/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,11 @@ pipeline {
BUILD_ID = env.BUILD_ID
sh '''
docker exec -i -e BUILD_ID="${BUILD_ID}" camp sh -c 'cd /stamp_docker_citygoApp/out/ && mkdir $BUILD_ID &&
cp -R /camp/samples/stamp/atos/functional/out/* /stamp_docker_citygoApp/out/$BUILD_ID/ &&
cp /camp/samples/stamp/atos/functional/camp_execute.log /stamp_docker_citygoApp/out/$BUILD_ID/ && exit';
cp -R /camp/samples/stamp/atos/functional/out/* /stamp_docker_citygoApp/out/$BUILD_ID/ &&
cp /camp/samples/stamp/atos/functional/camp_execute.log /stamp_docker_citygoApp/out/$BUILD_ID/ && exit';
ls -d /var/jenkins_home/workspace/citygo_case2_camp/out/$BUILD_ID/*/ > reportDirNames.txt;
cat /var/jenkins_home/workspace/citygo_case2_camp/out/$BUILD_ID/camp_execute.log | grep "Online report link" > linksFunctionalTestReports.log;
rm /var/jenkins_home/workspace/citygo_case2_camp/out/$BUILD_ID/camp_execute.log;
exit;
'''
zip zipFile: BUILD_ID+'_JMetterTestsLogs.zip', archive: true, dir: '/var/jenkins_home/workspace/citygo_case2_camp/out/'+BUILD_ID+'/', glob: '**/linksFunctionalTestReports.log'

def reportDirectories = readFile('reportDirNames.txt').split("\\r?\\n")
sh 'rm -f reportDirNames.txt'
for (i = 0; i < reportDirectories.size(); i++) {
Expand All @@ -66,7 +62,7 @@ pipeline {
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: reportDirectories[i] + '/test-reports/nginx-logs/',
reportFiles: 'error.log',
reportFiles: 'error.log','pytest_report.html',
reportName: reportDirectories[i].tokenize('/').last()
])
}
Expand Down
2 changes: 1 addition & 1 deletion samples/stamp/atos/functional/camp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ components:
docker:
file: browser/Dockerfile
tests:
command: pytest -v citygo-tests/tests.py --html=pytest_report.html --junitxml=report.xml --self-contained-html
command: pytest citygo-tests/tests.py --html=pytest_report.html --junitxml=report.xml --self-contained-html
reports:
location: "./"
pattern: ".xml"
Expand Down
12 changes: 5 additions & 7 deletions samples/stamp/atos/functional/template/browser/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@ FROM selenium/node-chrome-debug
RUN sudo apt-get update && \
sudo apt-get upgrade -y && \
sudo apt-get install -y \
python2.7 \
python-pip
python3 \
python3-pip

WORKDIR /browser

USER root
RUN chmod 777 -R /browser

RUN pip install --upgrade pip

# Install BlazeMetter to run performance Tests
RUN sudo -H pip install bzt
COPY ./citygo.jmx /browser/citygo-tests/citygo.jmx
#Install requirements.txt
COPY ./requirements.txt /browser/
RUN sudo -H pip3 install -r requirements.txt

#Funtional Tests
COPY ./tests.py /browser/citygo-tests/tests.py
Expand Down
2 changes: 1 addition & 1 deletion samples/stamp/atos/functional/template/citygo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN chmod +x /usr/src/app/entrypoint.sh
# copy project
COPY . /usr/src/app/

EXPOSE 80
EXPOSE 82

# run entrypoint.sh
ENTRYPOINT ["/bin/sh","/usr/src/app/entrypoint.sh"]
7 changes: 2 additions & 5 deletions samples/stamp/atos/functional/template/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This docker-compose file deploy the platfomr using Nginx Proxy Server
#
# Nginx acts as a proxy server and sends that request to Gunicorm
#
# Maintainer: Fernando Méndez Requena - [email protected]

version: '3'
Expand Down Expand Up @@ -38,9 +37,9 @@ services:
volumes:
- ./data/db:/data/db
ports:
- "27017:27017"
- "22222:22222"
expose:
- "27017"
- "22222"

nginx:
build: ./nginx
Expand All @@ -64,7 +63,6 @@ services:
- gzip_min_length=256
- reset_timedout_connection=on
volumes:
- ./app/:/usr/src/app/
- static_volume:/usr/src/app/static
- dsne-nginx-cert:/etc/ssl/certs:ro
- ./logs/:/var/log/nginx/
Expand All @@ -86,7 +84,6 @@ services:
- BROWSERCONNECTIONENABLED=True
- port=6666
volumes:
- ./app/:/usr/src/app/
- static_volume:/usr/src/app/static
- ./logs/:/usr/src/app/
expose:
Expand Down
2 changes: 1 addition & 1 deletion samples/stamp/atos/performance/template/browser/citygo.jmx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<boolProp name="LoopController.continue_forever">false</boolProp>
<stringProp name="LoopController.loops">1</stringProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">${__P(numThreads,350)}</stringProp>
<stringProp name="ThreadGroup.num_threads">${__P(numThreads,250)}</stringProp>
<stringProp name="ThreadGroup.ramp_time">${__P(numThreads,10)}</stringProp>
<longProp name="ThreadGroup.start_time">1528707181000</longProp>
<longProp name="ThreadGroup.end_time">1528707181000</longProp>
Expand Down

0 comments on commit 035eefc

Please sign in to comment.