diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 000000000..ff4a11064 --- /dev/null +++ b/.drone.yml @@ -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: {} diff --git a/.travis.yml b/.travis.yml index 6715d8ff6..8b9c281a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index a4e75d51d..0c0296798 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Makefile b/Makefile index 83f58ec73..b5ed2599a 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/hack/dev/kubectl.sh b/hack/dev/kubectl.sh index a7baa5e24..89f876130 100755 --- a/hack/dev/kubectl.sh +++ b/hack/dev/kubectl.sh @@ -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 $@ diff --git a/hack/dev/osctl.sh b/hack/dev/osctl.sh index c3214b5d1..8c740d8f0 100755 --- a/hack/dev/osctl.sh +++ b/hack/dev/osctl.sh @@ -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 $@