This commit is contained in:
parent
c9af67bc90
commit
16ec7f6699
46
.drone.yml
Normal file
46
.drone.yml
Normal 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
5
Dockerfile.alpine
Normal 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
5
Dockerfile.ubuntu
Normal 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' ]
|
@ -1,2 +1,5 @@
|
|||||||
# docker-bird-build
|
# docker-bird-build
|
||||||
|
|
||||||
|
[](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
32
build.sh
Executable 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
|
Loading…
x
Reference in New Issue
Block a user