Skip to content

Commit

Permalink
arm-qemu/native build & tweak deploy condition
Browse files Browse the repository at this point in the history
Moved ftl-build dockers to https://github.com/pi-hole/docker-base-images/
squashed commits

Signed-off-by: Adam Hill <adam@diginc.us>
  • Loading branch information
diginc committed Oct 31, 2019
1 parent b60d63f commit 7599734
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 108 deletions.
43 changes: 30 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,78 @@
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"
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}"
file pihole-FTL
- run:
name: "Upload"
command: |
[[ "$CIRCLE_PR_NUMBER" != "" ]] && exit 0
[[ "$CIRCLE_USERNAME" != "pi-hole" ]] && exit 0
FOLDER=$([ -z "$CIRCLE_TAG" ] && echo "$CIRCLE_BRANCH" || echo "$CIRCLE_TAG")
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}"
./FTL-client "${FOLDER}" "${BIN_NAME}" "${FTL_SECRET}"
./FTL-client "${FOLDER}" "${BIN_NAME}.sha1" "${FTL_SECRET}"
rm ./FTL-client
ls -lah .
.docker_template: &docker_template
docker:
- image: pihole/ftl-build:$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 +81,10 @@ workflows:
filters:
tags:
only: /^v.*/
- arm-qemu:
filters:
tags:
only: /^v.*/
- armhf:
filters:
tags:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ version*

# IDE files
.idea/
*.sw*

# Test-generated files
/pihole.log
Expand Down
13 changes: 0 additions & 13 deletions docker/aarch64/Dockerfile

This file was deleted.

32 changes: 0 additions & 32 deletions docker/arm/Dockerfile

This file was deleted.

13 changes: 0 additions & 13 deletions docker/armhf/Dockerfile

This file was deleted.

13 changes: 0 additions & 13 deletions docker/x86_32/Dockerfile

This file was deleted.

12 changes: 0 additions & 12 deletions docker/x86_64-musl/Dockerfile

This file was deleted.

12 changes: 0 additions & 12 deletions docker/x86_64/Dockerfile

This file was deleted.

0 comments on commit 7599734

Please sign in to comment.