adding some missing files from merger mistakes
This commit is contained in:
parent
b4a929f050
commit
c341e0316f
|
@ -3,4 +3,4 @@
|
|||
url = https://github.com/pi-hole/pi-hole.git
|
||||
[submodule "AdminLTE"]
|
||||
path = AdminLTE
|
||||
url = https://github.com/diginc/AdminLTE.git
|
||||
url = https://github.com/pi-hole/AdminLTE.git
|
||||
|
|
14
.travis.yml
14
.travis.yml
|
@ -1,12 +1,10 @@
|
|||
sudo: required
|
||||
|
||||
services:
|
||||
- docker
|
||||
language: python
|
||||
python:
|
||||
- "2.7"
|
||||
install:
|
||||
- pip install -r requirements.txt
|
||||
|
||||
before_install:
|
||||
- docker pull diginc/pi-hole:alpine
|
||||
- docker pull diginc/pi-hole:debian
|
||||
|
||||
script:
|
||||
- docker build -f alpine.docker .
|
||||
- docker build -f debian.docker .
|
||||
script: py.test -v
|
||||
|
|
|
@ -20,7 +20,7 @@ COPY ./pi-hole/advanced/Scripts/* /usr/local/bin/
|
|||
RUN mkdir -p /opt/ && ln -s /usr/local/bin /opt/pihole
|
||||
COPY ./pi-hole/advanced/dnsmasq.conf.original /etc/dnsmasq.conf
|
||||
COPY ./pi-hole/advanced/01-pihole.conf /etc/dnsmasq.d/
|
||||
COPY ./pi-hole/advanced/index.html /var/www/html/pihole/index.html
|
||||
COPY ./pi-hole/advanced/index* /var/www/html/pihole/
|
||||
COPY ./pi-hole/advanced/pihole.sudo /etc/sudoers.d/pihole
|
||||
COPY ./AdminLTE /var/www/html/admin
|
||||
COPY ./AdminLTE_version.txt /etc/
|
||||
|
|
|
@ -29,6 +29,11 @@ http {
|
|||
}
|
||||
}
|
||||
|
||||
location /*.js {
|
||||
index pihole/index.js
|
||||
error_page 404 =200 /pihole/index.js;
|
||||
}
|
||||
|
||||
location / {
|
||||
add_header X-Pi-hole "A black hole for Internet advertisements." always;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,9 @@ sed -i "s/@DNS2@/$DNS2/" /etc/dnsmasq.d/01-pihole.conf && \
|
|||
dnsmasq --test -7 /etc/dnsmasq.d || exit 1
|
||||
php-fpm -t || exit 1
|
||||
nginx -t || exit 1
|
||||
echo " :: All config checks passed, starting ..."
|
||||
|
||||
if [ -n "$PYTEST" ] ; then sed -i 's/^gravity_spinup/#donotcurl/g' `which gravity.sh`; fi;
|
||||
gravity.sh
|
||||
dnsmasq -7 /etc/dnsmasq.d
|
||||
php-fpm
|
||||
|
|
|
@ -26,7 +26,8 @@ RUN mkdir -p /opt/ && ln -s /usr/local/bin /opt/pihole
|
|||
COPY ./pi-hole/advanced/lighttpd.conf.debian /etc/lighttpd/lighttpd.conf
|
||||
COPY ./pi-hole/advanced/dnsmasq.conf.original /etc/dnsmasq.conf
|
||||
COPY ./pi-hole/advanced/01-pihole.conf /etc/dnsmasq.d/
|
||||
COPY ./pi-hole/advanced/index.html /var/www/html/pihole/index.html
|
||||
COPY ./pi-hole/advanced/index* /var/www/html/pihole/
|
||||
RUN rm /var/www/html/index.lighttpd.html
|
||||
COPY ./pi-hole/advanced/pihole.sudo /etc/sudoers.d/pihole
|
||||
COPY ./AdminLTE /var/www/html/admin
|
||||
COPY ./AdminLTE_version.txt /etc/
|
||||
|
|
|
@ -31,7 +31,9 @@ sed -i "s/@DNS2@/$DNS2/" /etc/dnsmasq.d/01-pihole.conf && \
|
|||
|
||||
dnsmasq --test -7 /etc/dnsmasq.d || exit 1
|
||||
lighttpd -t -f /etc/lighttpd/lighttpd.conf || exit 1
|
||||
echo " :: All config checks passed, starting ..."
|
||||
|
||||
if [ -n "$PYTEST" ] ; then sed -i 's/^gravity_spinup/#donotcurl/g' `which gravity.sh`; fi;
|
||||
gravity.sh # dnsmasq start included
|
||||
service lighttpd start
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
''' This file starts with 000 to make it run first '''
|
||||
import pytest
|
||||
import testinfra
|
||||
|
||||
run_local = testinfra.get_backend(
|
||||
"local://"
|
||||
).get_module("Command").run
|
||||
|
||||
@pytest.mark.parametrize("image,tag", [
|
||||
( 'alpine.docker', 'diginc/pi-hole:alpine' ),
|
||||
( 'debian.docker', 'diginc/pi-hole:debian' ),
|
||||
])
|
||||
def test_build_pihole_image(image, tag):
|
||||
build_cmd = run_local('docker build -f {} -t {} .'.format(image, tag))
|
||||
if build_cmd.rc != 0:
|
||||
print build_cmd.stdout
|
||||
print build_cmd.stderr
|
||||
assert build_cmd.rc == 0
|
Loading…
Reference in New Issue