diff --git a/.circleci/config.yml b/.circleci/config.yml index f5bc1a4..871d69e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: buildpack-deps:trusty-scm + - image: buildpack-deps:bionic-scm steps: - checkout diff --git a/scripts/compile_kernel.sh b/scripts/compile_kernel.sh index 9d2bddc..536f0b3 100755 --- a/scripts/compile_kernel.sh +++ b/scripts/compile_kernel.sh @@ -67,8 +67,8 @@ IMAGE_NAME["rpi2_3"]=kernel7.img function create_dir_for_build_user () { local target_dir=$1 - sudo mkdir -p $target_dir - sudo chown $BUILD_USER:$BUILD_GROUP $target_dir + mkdir -p $target_dir + chown $BUILD_USER:$BUILD_GROUP $target_dir } function setup_build_dirs () { @@ -244,7 +244,7 @@ echo "*** the kernel timestamp is: $NEW_VERSION ***" echo "#############################################" # clear build cache to fetch the current raspberry/firmware -sudo rm -fr $RASPBERRY_FIRMWARE +rm -fr $RASPBERRY_FIRMWARE # setup necessary build environment: dir, repos, etc. prepare_kernel_building diff --git a/scripts/deploy.sh b/scripts/deploy.sh index bcc247f..09fe1bd 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -3,8 +3,10 @@ echo "Circle Tag: $CIRCLE_TAG" if [ "$CIRCLE_TAG" != "" ]; then - gem install package_cloud - package_cloud push Hypriot/rpi/debian/stretch output/*/raspberrypi-kernel*.deb output/*/linux-libc-dev*.deb + apt-get update + apt-get install -y golang-go + go get github.com/mlafeldt/pkgcloud/... + $HOME/go/bin/pkgcloud-push Hypriot/rpi/debian/stretch output/*/raspberrypi-kernel*.deb output/*/linux-libc-dev*.deb curl -sSL https://github.com/tcnksm/ghr/releases/download/v0.5.4/ghr_v0.5.4_linux_amd64.zip -o ghr.zip unzip ghr.zip diff --git a/scripts/prepare_build_environment.sh b/scripts/prepare_build_environment.sh index cdbee89..45ac91a 100755 --- a/scripts/prepare_build_environment.sh +++ b/scripts/prepare_build_environment.sh @@ -1,6 +1,8 @@ -sudo apt-get update +#!/bin/bash + +apt-get update # needed by compile-kernel for package in git-core build-essential libncurses5-dev bc tree fakeroot devscripts binfmt-support qemu qemu-user-static debootstrap kpartx lvm2 dosfstools apt-cacher-ng debhelper quilt; do - sudo apt-get install -y $package + apt-get install -y $package done