mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-07 07:33:52 +02:00
TravisCI fixes
This commit is contained in:
parent
16e78087d1
commit
d7bce68738
3 changed files with 7 additions and 10 deletions
|
@ -70,8 +70,6 @@ script:
|
||||||
# - ansible-lint deploy.yml users.yml deploy_client.yml
|
# - ansible-lint deploy.yml users.yml deploy_client.yml
|
||||||
- ansible-playbook deploy.yml --syntax-check
|
- ansible-playbook deploy.yml --syntax-check
|
||||||
- ./tests/local-deploy.sh
|
- ./tests/local-deploy.sh
|
||||||
|
|
||||||
after_script:
|
|
||||||
- ./tests/update-users.sh
|
- ./tests/update-users.sh
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
|
|
|
@ -3,10 +3,11 @@
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
DEPLOY_ARGS="server_ip=$LXC_IP server_user=ubuntu IP_subject_alt_name=$LXC_IP local_dns=true dns_over_https=true apparmor_enabled=false install_headers=false"
|
DEPLOY_ARGS="server_ip=$LXC_IP server_user=ubuntu IP_subject_alt_name=$LXC_IP local_dns=true dns_over_https=true apparmor_enabled=false install_headers=false"
|
||||||
|
touch /tmp/ca_password
|
||||||
|
|
||||||
if [ "${LXC_NAME}" == "docker" ]
|
if [ "${LXC_NAME}" == "docker" ]
|
||||||
then
|
then
|
||||||
docker run -it -v $(pwd)/config.cfg:/algo/config.cfg -v ~/.ssh:/root/.ssh -e "DEPLOY_ARGS=${DEPLOY_ARGS}" travis/algo /bin/sh -c "chown -R 0:0 /root/.ssh && source env/bin/activate && ansible-playbook deploy.yml -t cloud,local,vpn,dns,ssh_tunneling,security,tests,dns_over_https -e \"${DEPLOY_ARGS}\" --skip-tags apparmor,wireguard"
|
docker run -it -v /tmp/ca_password:/tmp/ca_password -v $(pwd)/config.cfg:/algo/config.cfg -v ~/.ssh:/root/.ssh -v $(pwd)/configs:/algo/configs -e "DEPLOY_ARGS=${DEPLOY_ARGS}" travis/algo /bin/sh -c "chown -R 0:0 /root/.ssh && source env/bin/activate && ansible-playbook deploy.yml -t cloud,local,vpn,dns,ssh_tunneling,security,tests,dns_over_https -e \"${DEPLOY_ARGS}\" --skip-tags apparmor,wireguard"
|
||||||
else
|
else
|
||||||
ansible-playbook deploy.yml -t cloud,local,vpn,dns,dns_over_https,ssh_tunneling,tests -e "${DEPLOY_ARGS}" --skip-tags apparmor
|
ansible-playbook deploy.yml -t cloud,local,vpn,dns,dns_over_https,ssh_tunneling,tests -e "${DEPLOY_ARGS}" --skip-tags apparmor
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -3,20 +3,18 @@
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
CAPW=`cat /tmp/ca_password`
|
CAPW=`cat /tmp/ca_password`
|
||||||
USER_ARGS="server_ip=$LXC_IP server_user=ubuntu ssh_tunneling_enabled=y IP_subject=$LXC_IP easyrsa_CA_password=$CAPW"
|
USER_ARGS="server_ip=$LXC_IP server_user=ubuntu ssh_tunneling_enabled=y IP_subject=$LXC_IP easyrsa_CA_password=$CAPW apparmor_enabled=false install_headers=false"
|
||||||
|
|
||||||
sed -i 's/- jack$/- jack_test/' config.cfg
|
sed -i 's/- jack$/- jack_test/' config.cfg
|
||||||
|
|
||||||
if [ "${LXC_NAME}" == "docker" ]
|
if [ "${LXC_NAME}" == "docker" ]
|
||||||
then
|
then
|
||||||
docker run -it -v $(pwd)/config.cfg:/algo/config.cfg -v ~/.ssh:/root/.ssh -e "USER_ARGS=${USER_ARGS}" travis/algo /bin/sh -c "chown -R 0:0 /root/.ssh && source env/bin/activate && ansible-playbook users.yml -e \"${USER_ARGS}\""
|
docker run -it -v $(pwd)/config.cfg:/algo/config.cfg -v ~/.ssh:/root/.ssh -v $(pwd)/configs:/algo/configs -e "USER_ARGS=${USER_ARGS}" travis/algo /bin/sh -c "chown -R 0:0 /root/.ssh && source env/bin/activate && ansible-playbook users.yml -e \"${USER_ARGS}\" -t update-users --skip-tags common"
|
||||||
else
|
else
|
||||||
ansible-playbook users.yml -e "${USER_ARGS}"
|
ansible-playbook users.yml -e "${USER_ARGS}" -t update-users --skip-tags common
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd configs/$LXC_IP/pki/
|
if sudo openssl crl -inform pem -noout -text -in configs/$LXC_IP/pki/crl/jack.crt | grep CRL
|
||||||
|
|
||||||
if openssl crl -inform pem -noout -text -in crl/jack.crt | grep CRL
|
|
||||||
then
|
then
|
||||||
echo "The CRL check passed"
|
echo "The CRL check passed"
|
||||||
else
|
else
|
||||||
|
@ -24,7 +22,7 @@ if openssl crl -inform pem -noout -text -in crl/jack.crt | grep CRL
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if openssl x509 -inform pem -noout -text -in certs/jack_test.crt | grep CN=jack_test
|
if sudo openssl x509 -inform pem -noout -text -in configs/$LXC_IP/pki/certs/jack_test.crt | grep CN=jack_test
|
||||||
then
|
then
|
||||||
echo "The new user exists"
|
echo "The new user exists"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue