From e178bbd59303052fbc90b44a8955433908e872d5 Mon Sep 17 00:00:00 2001 From: Yilin Sun Date: Tue, 16 Apr 2024 14:00:06 +0800 Subject: [PATCH] Use drone templates. Signed-off-by: Yilin Sun --- .drone.yml | 38 +++++++++++--------------------------- .drone/NOTE | 1 + .drone/build-image.yaml | 27 +++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 27 deletions(-) create mode 100644 .drone/NOTE create mode 100644 .drone/build-image.yaml diff --git a/.drone.yml b/.drone.yml index df59b4e..79258ca 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,29 +1,13 @@ --- -kind: pipeline -type: vm -name: System Image - -pool: - use: do-docker-20-04 - -steps: -- name: Submodules - commands: - - git submodule update --init --recursive - -- name: Dependencies - environment: - DEBIAN_FRONTEND: noninteractive - commands: - - apt-get update - - apt-get install -y sed make binutils build-essential diffutils gcc g++ bash patch gzip bzip2 perl tar cpio unzip rsync file bc findutils wget - -- name: Configure - commands: - - ./buildroot_make.sh lwgw_orangepi_pc_defconfig - -- name: Build - commands: - - ./buildroot_make.sh - +kind: template +load: build-image.yaml +data: + name: "RaspberryPi 2" + defconfig: "rpi2_defconfig" +--- +kind: template +load: build-image.yaml +data: + name: "TLT113i-miniEVM" + defconfig: "tlt113_minievm_defconfig" diff --git a/.drone/NOTE b/.drone/NOTE new file mode 100644 index 0000000..0b1b8f1 --- /dev/null +++ b/.drone/NOTE @@ -0,0 +1 @@ +This directory is only used to store the files as a reference, the actual templates are stored on Drone server. diff --git a/.drone/build-image.yaml b/.drone/build-image.yaml new file mode 100644 index 0000000..49a9f25 --- /dev/null +++ b/.drone/build-image.yaml @@ -0,0 +1,27 @@ +kind: pipeline +type: vm +name: Build Image for {{ .input.name }} + +pool: + use: do-docker-20-04 + +steps: +- name: Submodules for {{ .input.name }} + commands: + - git submodule update --init --recursive + +- name: Install dependencies for {{ .input.name }} + environment: + DEBIAN_FRONTEND: noninteractive + commands: + - apt-get update + - apt-get install -y sed make binutils build-essential diffutils gcc g++ bash patch gzip bzip2 perl tar cpio unzip rsync file bc findutils wget + +- name: Configure for {{ .input.name }} + commands: + - ./buildroot_make.sh {{ .input.defconfig }} + +- name: Build image for {{ .input.name }} + commands: + - ./buildroot_make.sh -j4 +