Update main.yml #161
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
on: | |
push: | |
branches: | |
- unattended-install | |
jobs: | |
unattended_install_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Move files and run script | |
run: | | |
sudo mkdir -p /opt/lme | |
sudo cp -r * /opt/lme/ | |
cd /opt/lme | |
sudo chmod +x "/opt/lme/Chapter 3 Files/unattended_deploy.sh" | |
sudo "/opt/lme/Chapter 3 Files/unattended_deploy.sh" | |
sudo docker ps | |
- name: Test Elasticsearch | |
run: | | |
ELASTICSEARCH_URL="https://127.0.0.1:9200" | |
response=$(sudo curl -s --cacert "/opt/lme/Chapter 3 Files/certs/root-ca.crt" --user "elastic:dvXFkH9CnFuW3CcvYYEiYwB0ziOt08DE" -o /dev/null -w "%{http_code}" $ELASTICSEARCH_URL) | |
if [ "$response" -eq 200 ]; then | |
echo "Elasticsearch is up and running." | |
else | |
echo "Elasticsearch is not responding." | |
exit 1 | |
fi | |
- name: Test Kibana | |
run: | | |
KIBANA_URL="https://127.0.0.1:5601" | |
response=$(sudo curl -s --cacert "/opt/lme/Chapter 3 Files/certs/root-ca.crt" --user "elastic:dvXFkH9CnFuW3CcvYYEiYwB0ziOt08DE" -o /dev/null -w "%{http_code}" $KIBANA_URL) | |
if [ "$response" -eq 200 ]; then | |
echo "Kibana is up and running." | |
else | |
echo "Kibana is not responding." | |
exit 1 | |
fi | |