Skip to content

Commit

Permalink
Merge pull request #747 from pi-hole/release/v5.0
Browse files Browse the repository at this point in the history
Pi-hole FTL v5.0
  • Loading branch information
PromoFaux authored May 10, 2020
2 parents b60d63f + c499c17 commit 3d7c095
Show file tree
Hide file tree
Showing 141 changed files with 26,688 additions and 18,117 deletions.
61 changes: 42 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,81 @@
version: 2

.job_template: &job_template
docker:
- image: pihole/ftl-build:$CIRCLE_JOB
.job_steps: &job_steps
steps:
- checkout
- run:
name: "Setup"
command: |
make clean
if [[ $CIRCLE_JOB == *"qemu"* ]] ; then sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset ; fi
- run:
name: "Build"
no_output_timeout: 30m
command: |
BRANCH=$([ -z "$CIRCLE_TAG" ] && echo "$CIRCLE_BRANCH" || echo "master")
make GIT_BRANCH="${BRANCH}" GIT_TAG="${CIRCLE_TAG}"
[[ $CIRCLE_JOB == *"qemu"* ]] && DOCKERIFNEEDED="docker run --rm -v $(pwd):/workspace -w /workspace pihole/ftl-build:arm-qemu "
$DOCKERIFNEEDED make GIT_BRANCH="${BRANCH}" GIT_TAG="${CIRCLE_TAG}" STATIC="${STATIC}"
file pihole-FTL
- run:
name: "Upload"
command: |
FOLDER=$([ -z "$CIRCLE_TAG" ] && echo "$CIRCLE_BRANCH" || echo "$CIRCLE_TAG")
[[ "$CIRCLE_PROJECT_REPONAME" == "FTL" && "$CIRCLE_PROJECT_USERNAME" == "pi-hole" ]] || exit 0
DIR="${CIRCLE_TAG:-${CIRCLE_BRANCH}}"
mv pihole-FTL "${BIN_NAME}"
sha1sum pihole-FTL-* > ${BIN_NAME}.sha1
wget https://ftl.pi-hole.net:8080/FTL-client
chmod +x ./FTL-client
[[ "$CIRCLE_PR_NUMBER" == "" ]] && ./FTL-client "${FOLDER}" "${BIN_NAME}" "${FTL_SECRET}"
[[ "$CIRCLE_PR_NUMBER" == "" ]] && ./FTL-client "${FOLDER}" "${BIN_NAME}.sha1" "${FTL_SECRET}"
rm ./FTL-client
ls -lah .
mkdir -p ~/.ssh/
ssh-keyscan -H $SSH_HOST >> ~/.ssh/known_hosts
sftp -b - $SSH_USER@$SSH_HOST <<< "-mkdir ${DIR}
put ${BIN_NAME}* ${DIR}"
mv "${BIN_NAME}" pihole-FTL
- run:
name: "Test"
command: |
test/run.sh
.docker_template: &docker_template
docker:
- image: pihole/ftl-build:v1.0-$CIRCLE_JOB
<<: *job_steps

jobs:
arm:
<<: *job_template
<<: *docker_template
environment:
BIN_NAME: "pihole-FTL-arm-linux-gnueabi"

armhf:
<<: *job_template
<<: *docker_template
environment:
BIN_NAME: "pihole-FTL-arm-linux-gnueabihf"

aarch64:
<<: *job_template
<<: *docker_template
environment:
BIN_NAME: "pihole-FTL-aarch64-linux-gnu"

x86_64:
<<: *job_template
<<: *docker_template
environment:
BIN_NAME: "pihole-FTL-linux-x86_64"

x86_64-musl:
<<: *job_template
<<: *docker_template
environment:
BIN_NAME: "pihole-FTL-musl-linux-x86_64"

x86_32:
<<: *job_template
<<: *docker_template
environment:
BIN_NAME: "pihole-FTL-linux-x86_32"

arm-qemu:
machine:
enabled: true
environment:
BIN_NAME: "pihole-FTL-armel-native"
<<: *job_steps

workflows:
version: 2
build:
Expand All @@ -68,6 +84,10 @@ workflows:
filters:
tags:
only: /^v.*/
- arm-qemu:
filters:
tags:
only: /^v.*/
- armhf:
filters:
tags:
Expand All @@ -80,7 +100,10 @@ workflows:
filters:
tags:
only: /^v.*/
# - x86_64-musl
- x86_64-musl:
filters:
tags:
only: /^v.*/
- x86_32:
filters:
tags:
Expand Down
24 changes: 10 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Generated binary files
/obj/
/dnsmasq/obj
# Object files output by the assembler
/build

# Generated binary
pihole-FTL
socket-test

# Versioning files
# Versioning files (generated by Makefile)
version*

# CMake files
Expand All @@ -13,13 +13,9 @@ version*

# IDE files
.idea/
*.sw*
.vscode/

# Test-generated files
/pihole.log
/pihole-FTL.conf
/pihole-FTL.db
/pihole-FTL.log

# aux files
aux/manuf.data
aux/macvendor.db
# MAC->Vendor database files
tools/manuf.data
tools/macvendor.db
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
[submodule "test/libs/bats"]
path = test/libs/bats
url = https://github.com/sstephenson/bats
[submodule "test/libs/bats-support"]
path = test/libs/bats-support
url = https://github.com/ztombol/bats-support
Loading

0 comments on commit 3d7c095

Please sign in to comment.