Add drone build

master
eater 5 years ago
parent 5f6599c893
commit 888a5ca0aa
Signed by: eater
GPG Key ID: 656785D50BE51C0A

@ -0,0 +1,14 @@
---
kind: pipeline
name: default
steps:
- name: build
image: d.xr.to/img
privileged: true
commands:
- img login -u "drone" -p "$PASSWORD" d.xr.to
- PUSH=y DOCKER=img ./build-tagged.sh
environment:
PASSWORD:
from_secret: pass

@ -13,6 +13,9 @@ TOOLBOX?=toybox
PACKAGES?=xbps bash ncurses-base shadow
# Directory where chroot should be build
BUILDDIR?=$(PWD)/build
# Executable used for making the docker container (e.g. img or docker)
DOCKER_BUILDER?=docker
ifeq ($(TOOLBOX),none)
VALID_TOOLBOX?=1
endif
@ -90,7 +93,7 @@ endif
install: build
# Import directory as tar (owned by root) into docker
tar --owner 0 --group 0 -pC $(BUILDDIR) -c . | docker import -m '$(IMAGE) initialization from chroot' -c 'LABEL maintainer="$(MAINTAINER)"' - $(IMAGE)
tar --owner 0 --group 0 -pC $(BUILDDIR) -c . | $(DOCKER_BUILDER) import -m '$(IMAGE) initialization from chroot' -c 'LABEL maintainer="$(MAINTAINER)"' - $(IMAGE)
clean:
# Remove build directory

@ -1,8 +1,13 @@
#!/usr/bin/env bash
IMAGE="${1:-d.xr.to/base}";
MAINTAINER="${2:-=@eater.me}";
DOCKER_BUILDER="${DOCKER_BUILDER:-docker}"
for toolbox in "none" "toybox" "busybox" "default"; do
make IMAGE="${IMAGE}:${toolbox}" TOOLBOX="${toolbox}";
make IMAGE="${IMAGE}:${toolbox}" TOOLBOX="${toolbox}" DOCKER_BUILDER="${DOCKER_BUILDER}";
done
docker tag "${IMAGE}:toybox" "${IMAGE}:latest";
make IMAGE="${IMAGE}:glibc" TOOLBOX="toybox" ARCH="x86_64"
make IMAGE="${IMAGE}:glibc" TOOLBOX="toybox" ARCH="x86_64" DOCKER_BUILDER="${DOCKER_BUILDER}"
if [ "${PUSH}" = "y" ]; then
docker push "${IMAGE}";
fi

Loading…
Cancel
Save