initial commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simon Marsh 2021-12-30 12:58:55 +00:00
parent c9af67bc90
commit 16ec7f6699
Signed by: burble
GPG Key ID: 0FCCD13AE1CF7ED8
5 changed files with 91 additions and 0 deletions

46
.drone.yml Normal file
View File

@ -0,0 +1,46 @@
---
kind: pipeline
type: docker
name: docker-build
steps:
- name: docker alpine
image: plugins/docker
settings:
registry: c8n.io
repo: c8n.io/simonburblecom/bird-build
tags:
- alpine
username:
from_secret: DOCKER_USER
password:
from_secret: DOCKER_PW
dockerfile: Dockerfile.alpine
- name: docker ubuntu
image: plugins/docker
settings:
registry: c8n.io
repo: c8n.io/simonburblecom/bird-build
tags:
- ubuntu
username:
from_secret: DOCKER_USER
password:
from_secret: DOCKER_PW
dockerfile: Dockerfile.ubuntu
---
kind: secret
name: DOCKER_USER
get:
path: burble.dn42/kv/data/drone/docker
name: username
---
kind: secret
name: DOCKER_PW
get:
path: burble.dn42/kv/data/drone/docker
name: password

5
Dockerfile.alpine Normal file
View File

@ -0,0 +1,5 @@
FROM alpine
RUN apk add --update bash build-base git autoconf flex bison linux-headers ncurses-dev readline-dev && rm -rf /var/cache/apk/*
ADD build.sh /build.sh
RUN echo "alpine" > /dist
ENTRYPOINT [ '/build.sh' ]

5
Dockerfile.ubuntu Normal file
View File

@ -0,0 +1,5 @@
FROM ubuntu
RUN apt -y update && apt -y dist-upgrade && apt -y install build-essential git autoconf flex bison linux-headers-generic libncurses-dev libreadline-dev && apt -y autoremove --purge && apt -y autoclean && rm -rf /var/cache/apt/archives
ADD build.sh /build.sh
RUN echo "ubuntu" > /dist
ENTRYPOINT [ '/build.sh' ]

View File

@ -1,2 +1,5 @@
# docker-bird-build
[![Build Status](https://ci.burble.dn42/api/badges/burble.dn42/docker-bird-build/status.svg?ref=refs/heads/main)](https://ci.burble.dn42/burble.dn42/docker-bird-build)
burble.dn42 specific docker image for building bird via Drone CI

32
build.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash -e
##########################################################################
DIST=$(cat /dist)
# clear any previous build
if [ -f Makefile ]
then
make distclean
fi
if [ ! -f configure ];
then
autoreconf
fi
# configure it
./configure \
--prefix=/usr \
--sysconfdir=/etc/bird \
--localstatedir=/var \
2>&1 | tee conf.out
# build it
make -j3 \
2>&1 | tee build.out
mkdir -p artifacts/${DIST} > /dev/null 2>&1
mv bird birdc birdcl artifacts/${DIST}
##########################################################################
# end of file