chore: add drone build (#523)

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This commit is contained in:
Andrew Rynhard 2019-04-11 15:24:51 -07:00 committed by GitHub
parent 9f35d54b11
commit 8e45137879
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 76 additions and 7 deletions

67
.drone.yml Normal file
View File

@ -0,0 +1,67 @@
kind: pipeline
name: default
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
steps:
- name: conform
image: autonomy/conform:c539351
- name: lint
image: autonomy/build-container:latest
pull: true
environment:
BUILDKIT_HOST: tcp://buildkitd.ci.svc:1234
commands:
- make lint
volumes:
- name: dockersock
path: /var/run
- name: test
image: autonomy/build-container:latest
pull: true
environment:
BUILDKIT_HOST: tcp://buildkitd.ci.svc:1234
commands:
- make test
volumes:
- name: dockersock
path: /var/run
- name: build
image: autonomy/build-container:latest
pull: true
environment:
BUILDKIT_HOST: tcp://buildkitd.ci.svc:1234
commands:
- make
volumes:
- name: dockersock
path: /var/run
- name: basic-integration
image: autonomy/build-container:latest
pull: true
environment:
BUILDKIT_HOST: tcp://buildkitd.ci.svc:1234
commands:
- cd hack/dev
- make integration
volumes:
- name: dockersock
path: /var/run
depends_on:
- conform
- lint
- test
- build
volumes:
- name: dockersock
temp: {}

View File

@ -7,6 +7,8 @@ before_install:
- make ci BINDIR=/usr/bin
- export BUILDKIT_HOST=tcp://0.0.0.0:1234
script:
- make lint
- make test
- make
- make talos
- cd hack/dev

View File

@ -37,7 +37,7 @@ RUN curl -o /rootfs/etc/ssl/certs/ca-certificates.crt https://curl.haxx.se/ca/ca
# xfsprogs
WORKDIR /tmp/xfsprogs
RUN curl -L https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-4.18.0.tar.xz | tar -xJ --strip-components=1
RUN make \
RUN make -j $(($(nproc) / 2)) \
DEBUG=-DNDEBUG \
INSTALL_USER=0 \
INSTALL_GROUP=0 \
@ -48,7 +48,7 @@ RUN curl -L https://github.com/dosfstools/dosfstools/releases/download/v4.1/dosf
RUN ./configure \
--prefix=/ \
--enable-compat-symlinks
RUN make
RUN make -j $(($(nproc) / 2))
RUN make install DESTDIR=/rootfs
# libblkid
RUN cp /toolchain/lib/libblkid.* /rootfs/lib
@ -59,7 +59,7 @@ RUN mkdir /tmp/syslinux
WORKDIR /tmp/syslinux
RUN curl -L https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.xz | tar -xJ --strip-components=1
RUN ln -s /toolchain/bin/pwd /bin/pwd && \
make installer && \
make -j $(($(nproc) / 2)) installer && \
cp /tmp/syslinux/bios/extlinux/extlinux /rootfs/bin && \
cp /tmp/syslinux/efi64/mbr/gptmbr.bin /rootfs/share
# golang
@ -137,7 +137,7 @@ RUN ../configure \
--disable-nftables \
--enable-libipq \
--with-xtlibdir=/lib/xtables
RUN make
RUN make -j $(($(nproc) / 2))
RUN make install DESTDIR=/rootfs
# libseccomp
WORKDIR /toolchain/usr/local/src/libseccomp

View File

@ -32,7 +32,7 @@ COMMON_ARGS += --frontend-opt build-arg:TOOLCHAIN_IMAGE=$(TOOLCHAIN_IMAGE)
COMMON_ARGS += --frontend-opt build-arg:SHA=$(SHA)
COMMON_ARGS += --frontend-opt build-arg:TAG=$(TAG)
all: ci lint test kernel initramfs rootfs osctl-linux-amd64 osctl-darwin-amd64 osinstall-linux-amd64 installer
all: ci kernel initramfs rootfs osctl-linux-amd64 osctl-darwin-amd64 osinstall-linux-amd64 installer talos
.PHONY: builddeps
builddeps: gitmeta buildctl

View File

@ -1,3 +1,3 @@
#!/bin/bash
docker run --rm -it --network dev_talosbr -v "${PWD}/kubeconfig":/root/.kube/config -v "${PWD}/manifests":/manifests k8s.gcr.io/hyperkube:${HYPERKUBE_TAG:-v1.14.0} kubectl $@
docker run --rm -i --network dev_talosbr -v "${PWD}/kubeconfig":/root/.kube/config -v "${PWD}/manifests":/manifests k8s.gcr.io/hyperkube:${HYPERKUBE_TAG:-v1.14.0} kubectl $@

View File

@ -1,3 +1,3 @@
#!/bin/bash
docker run --rm -it -v "${PWD}/../../build/osctl-linux-amd64:/bin/osctl:ro" -v "${PWD}/talosconfig:/root/.talos/config" --network dev_talosbr alpine osctl $@
docker run --rm -i -v "${PWD}/../../build/osctl-linux-amd64:/bin/osctl:ro" -v "${PWD}/talosconfig:/root/.talos/config" --network dev_talosbr alpine osctl $@