1.Create a Dockerfile in the correct format at Linux env:
echo 'FROM sitespeedio/sitespeed.io:38.5.1' > Dockerfile.sitespeed
echo 'RUN npm install @sitespeed.io/plugin-influxdb' >> Dockerfile.sitespeed
echo 'CMD ["--help"]' >> Dockerfile.sitespeed
2.Build custom image:
docker build -t sitespeed.io:38.5.1 -f Dockerfile.sitespeed .
3.The command line content of sitespeed running under Jenkins is:
sudo docker run --shm-size=2g --rm -v /etc/hosts:/etc/hosts:ro -v /data:/sitespeed.io sitespeed.io:38.5.1 ${URL}
--browsertime.browser chrome --chrome.timeline -n 5
--timeouts.script 300000 --maxLoadTime 300000 -e MAX_OLD_SPACE_SIZE=2048
--influxdb.host=10.10.10.10 --influxdb.username=admin --influxdb.password=admin --influxdb.database=ResultData
4.The test execution is completed, and the result report can be viewed correctly in Jenkins. When viewing the ResultData database of Influxdb, the database is empty; Adding the -- inluxdb parameter to the command line still yields an empty result