Add cofnig jenkins API + install node on server + install pip in jenkins docker

This commit is contained in:
Mathieu Sanchez 2019-04-25 11:20:03 +09:00
parent 9b6fb43390
commit c3d98b2c2a
3 changed files with 84 additions and 1 deletions

71
Config API Jenkins.sh Normal file
View File

@ -0,0 +1,71 @@
#!/bin/sh
pip3 install -r requirements.txt
pip3 install -U pytest
echo
echo "#\n# Launching the users unit tests\n#"
echo
python3 -m pytest Tests/test_api_user.py -v
status=$?
if test $status -ne 0
then
echo "Error when executing the Users unit tests."
exit 1
else
echo "Successfully passed the Users unit tests."
fi
echo
echo "#\n# Launching the reports unit tests\n#"
echo
python3 -m pytest Tests/test_api_reports.py -v
status=$?
if test $status -ne 0
then
echo "Error when executing the Reports unit tests."
exit 1
else
echo "Successfully passed the Reports unit tests."
fi
echo
echo "#\n# Launching the reports unit tests\n#"
echo
python3 -m pytest Tests/pytest_api_vehicles.py -v
status=$?
if test $status -ne 0
then
echo "Error when executing the Vehicles unit tests."
exit 1
else
echo "Successfully passed the Vehicles unit tests."
fi
echo
echo "#\n# Launching the Authentifications unit tests\n#"
echo
python3 -m pytest Tests/test_api_login.py -v
status=$?
if test $status -ne 0
then
echo "Error when executing the Authentifications unit tests."
exit 1
else
echo "Successfully passed the Authentifications unit tests."
fi
echo
echo "#\n# Launching the Emails unit tests\n#"
echo
python3 -m pytest Tests/test_api_email.py -v
status=$?
if test $status -ne 0
then
echo "Error when executing the Emails unit tests."
exit 1
else
echo "Successfully passed the Emails unit tests."
fi
echo
exit 0

View File

@ -8,6 +8,8 @@ rm /root/sdk-tools-linux-4333796.zip
yes | /root/tools/bin/sdkmanager "platforms;android-28" --sdk_root=/opt/android-sdk
apt-get update
apt-get install -y curl
apt-get install -y curl python3-pip
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs
git config --global http.sslverify "false"

View File

@ -37,6 +37,12 @@ ssh-keygen -t rsa -b 4096 -C "c2a.toulouse@gmail.com"
# Install let's encrypt
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
# Install node and NPM
apt-get update
apt-get install -y curl
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs
# Launch Install Script
./docker/install-nginx.sh
./docker/install-gitlab.sh
@ -46,3 +52,7 @@ git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
./docker/install-mongo.sh
service nginx restart
# Configure git if someone push from the server
git config --global user.name "Serveur"
git config --global user.email "c2a.toulouse@gmail.com"