From 19bbe64a56eab2ee08b3f939ddce7580d0735d60 Mon Sep 17 00:00:00 2001 From: Yinling Date: Mon, 12 Sep 2016 19:09:28 +0800 Subject: [PATCH 1/3] update ci: build ssc with idf submodule wifi lib --- .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 23f1a16d8d..bae6ab9b71 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,9 +59,7 @@ build_ssc: expire_in: 6 mos script: - # use gitlab wifi lib instead of github wifi lib - - git clone ssh://git@gitlab.espressif.cn:27227/idf/esp32-wifi-lib.git - - cp esp32-wifi-lib/* components/esp32/lib/ + - git submodule update --init --recursive - git clone ssh://git@gitlab.espressif.cn:27227/yinling/SSC.git - cd SSC - make defconfig From 417dcee450a73ede6dee0e7be9cbcdaa5bf5f2d3 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 13 Sep 2016 11:34:28 +1000 Subject: [PATCH 2/3] ci: Use github repo for wifi libraries on master branch, gitlab repo otherwise --- .gitlab-ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bae6ab9b71..b4e62e1fed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,18 @@ stages: - deploy before_script: + # add gitlab ssh key + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - echo -n $GITLAB_KEY >> ~/.ssh/id_rsa_base64 + - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa + - chmod 600 ~/.ssh/id_rsa + - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config + + # if testing master branch, use github wifi libs. + # if testing other branches, use gitlab wifi libs (as maybe changes aren't merged to master yet) + - test "${CI_BUILD_REF_NAME}" = "master" || sed -i "s%https://github.com/espressif/esp32-wifi-lib%ssh://git@gitlab.espressif.cn:27227/idf/esp32-wifi-lib%" .gitmodules + # fetch all submodules - git submodule update --init --recursive build_template_app: @@ -59,7 +71,6 @@ build_ssc: expire_in: 6 mos script: - - git submodule update --init --recursive - git clone ssh://git@gitlab.espressif.cn:27227/yinling/SSC.git - cd SSC - make defconfig From 1f6fca672d00d4f09a019d6dc2efac876a4d4ec6 Mon Sep 17 00:00:00 2001 From: Yinling Date: Tue, 13 Sep 2016 10:06:09 +0800 Subject: [PATCH 3/3] installed gitlab key in global before_script, don't need to overwrite in template before_script --- .gitlab-ci.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b4e62e1fed..96006f8c8c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,15 +51,6 @@ build_template_app: IDF_PATH: "$CI_PROJECT_DIR" GIT_STRATEGY: clone - # add gitlab key to build docker - before_script: - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - - echo -n $GITLAB_KEY >> ~/.ssh/id_rsa_base64 - - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa - - chmod 600 ~/.ssh/id_rsa - - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - build_ssc: <<: *build_template artifacts: @@ -77,8 +68,6 @@ build_ssc: - chmod +x gen_misc_ng.sh - ./gen_misc_ng.sh - - test_nvs_on_host: stage: test image: espressif/esp32-ci-env