From 86e0882f15fe809a4f448fabd91d580d957548ea Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Mon, 14 Aug 2023 22:11:16 -0500 Subject: [PATCH] ci: try building sdcard.img Signed-off-by: Robert Nelson --- .gitlab-ci.yml | 16 ++++++++++++++++ ...root.sh => 06_generate_debian_console_root.sh | 4 ++-- create_sdcard_img.sh => 07_create_sdcard_img.sh | 4 ++-- 3 files changed, 20 insertions(+), 4 deletions(-) rename generate_debian_console_root.sh => 06_generate_debian_console_root.sh (96%) rename create_sdcard_img.sh => 07_create_sdcard_img.sh (68%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1636e0..22bbdca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,13 @@ image: robertcnelson/debian-bookworm-slim-riscv:latest +before_script: + - eval $(ssh-agent -s) + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - ssh-keyscan git.beagleboard.org > ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + cache: key: "$CI_PROJECT_NAME" paths: @@ -16,4 +24,12 @@ build: - ./03_build_u-boot.sh - ./04_build_linux.sh - ./05_generate_payload.bin.sh + - sudo ./06_generate_debian_console_root.sh + - sudo ./07_create_sdcard_img.sh - tree -s ./deploy/ + - cp ./deploy/images/sdcard.img ./ + artifacts: + expire_in: 14 days + name: "$CI_PROJECT_NAME-$CI_JOB_ID" + paths: + - "sdcard.img" diff --git a/generate_debian_console_root.sh b/06_generate_debian_console_root.sh similarity index 96% rename from generate_debian_console_root.sh rename to 06_generate_debian_console_root.sh index 4a42f12..68c5760 100755 --- a/generate_debian_console_root.sh +++ b/06_generate_debian_console_root.sh @@ -1,8 +1,8 @@ #!/bin/bash if ! id | grep -q root; then - echo "./generate_debian_console_root.sh must be run as root:" - echo "sudo ./generate_debian_console_root.sh" + echo "./06_generate_debian_console_root.sh must be run as root:" + echo "sudo ./06_generate_debian_console_root.sh" exit fi diff --git a/create_sdcard_img.sh b/07_create_sdcard_img.sh similarity index 68% rename from create_sdcard_img.sh rename to 07_create_sdcard_img.sh index 3d65eff..9d5d9db 100755 --- a/create_sdcard_img.sh +++ b/07_create_sdcard_img.sh @@ -1,8 +1,8 @@ #!/bin/bash if ! id | grep -q root; then - echo "./create_sdcard_img.sh must be run as root:" - echo "sudo ./create_sdcard_img.sh" + echo "./07_create_sdcard_img.sh must be run as root:" + echo "sudo ./07_create_sdcard_img.sh" exit fi