From 3bb042713d34a4a12ce5f38e8712c61ede53b99c Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Tue, 26 Feb 2019 13:07:58 +0100 Subject: [PATCH] Update ci --- .ci/download_sdk.sh | 8 ++++++++ .ci/prepare_build_dir.sh | 15 +++++++++++++++ .gitlab-ci.yml | 22 ++++++---------------- 3 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 .ci/download_sdk.sh create mode 100644 .ci/prepare_build_dir.sh diff --git a/.ci/download_sdk.sh b/.ci/download_sdk.sh new file mode 100644 index 0000000..7cfa1de --- /dev/null +++ b/.ci/download_sdk.sh @@ -0,0 +1,8 @@ +mkdir ~/sdk +cd ~/sdk + +curl "https://$SDK_HOST/$SDK_PATH/sha256sums" -sS -o sha256sums +curl "https://$SDK_HOST/$SDK_PATH/sha256sums.asc" -sS -o sha256sums.asc +gpg --with-fingerprint --verify sha256sums.asc sha256sums +rsync -av "$SDK_HOST::downloads/$SDK_PATH/$SDK_FILE" . +sha256sum -c --ignore-missing sha256sums \ No newline at end of file diff --git a/.ci/prepare_build_dir.sh b/.ci/prepare_build_dir.sh new file mode 100644 index 0000000..1ef6ed0 --- /dev/null +++ b/.ci/prepare_build_dir.sh @@ -0,0 +1,15 @@ + +mkdir ~/build_dir +cd ~/build_dir + +tar Jxf ~/sdk/$SDK_FILE --strip=1 + +cat > feeds.conf < /dev/null +./scripts/feeds install -a > /dev/null \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b5e4b61..82301a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,21 +11,11 @@ stages: compile: stage: compile script: - - mkdir ~/build_dir - - cd ~/build_dir - - echo "==== extract sdk ====" - - rsync -av "$SDK_HOST::downloads/$SDK_PATH/$SDK_FILE" ~/sdk/ - - tar Jxf ~/sdk/$SDK_FILE --strip=1 - - echo "==== run feed ====" - - echo - src-git base https://github.com/openwrt/openwrt.git;master - src-link wifictld /builds/$CI_PROJECT_PATH - > feeds.conf - - cat feeds.conf - - ./scripts/feeds update -a > /dev/null - - ./scripts/feeds install -a > /dev/null - - make defconfig > /dev/null - - sed -i 's/# CONFIG_BUILD_LOG is not set/CONFIG_BUILD_LOG=y/' .config - - for PKG in /builds/$CI_PROJECT_PATH/wifictld/* ; do echo $PKG; done + - echo "==== Download the SDK ====" + - /builds/$CI_PROJECT_PATH/.ci/download_sdk.sh + - echo "==== Prepare build_dir ====" + - /builds/$CI_PROJECT_PATH/.ci/prepare_build_dir.sh + - echo "==== list all packages ====" + - for PKG in /builds/$CI_PROJECT_PATH/$CI_PROJECT_NAME/* ; do echo $PKG; done artifacts: paths: \ No newline at end of file