Skip to content

Update main.yml

Update main.yml #160

Workflow file for this run

---
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=$(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=$(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