summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-09-01 14:04:33 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-09-02 17:31:34 +0000
commit9fdf36fc57e570200ac9c2b4c5ed5d8fc41d9ce7 (patch)
treed69bce4fd0ec3eeab5a3c0286f47c8c92b880557
parent668b378306e108743bf8434d95f34a800fc9ecc8 (diff)
downloadchrome-ec-9fdf36fc57e570200ac9c2b4c5ed5d8fc41d9ce7.tar.gz
gitlab: Fix some path problems in gitlab ci
Moving the EC dir wasn't moving the dot files, also deleting the files from the cache defeats the purpose of the cache. Corrected both problems. BRANCH=None BUG=None TEST=Pushed to coverage branch in gitlab. Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I2920ec27eafdc76248e9253724b29a198262865a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3869307 Reviewed-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--.gitlab-ci.yml13
1 files changed, 6 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1442d03cda..00f7280b17 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -50,18 +50,17 @@ before_script:
- echo "CI_PROJECT_DIR is at ${CI_PROJECT_DIR}"
# Move freshly-checked out ec code to subdirectory
- cd ${CI_PROJECT_DIR}
- - shopt -s extglob
- mkdir -p ec_dir
- - mv -- !(ec_dir) ec_dir
- - shopt -u extglob
+ - find . -mindepth 1 -maxdepth 1 -name ec_dir -o -print0 | xargs -0 -I {} mv {} ec_dir
- export EC_DIR="${CI_PROJECT_DIR}/ec_dir"
# Remove old zephyr and module checkouts (unwanted cache artifact)
- - rm -rf ${EC_DIR}/zephyr/main
- - rm -rf ${EC_DIR}/modules
- # Get Zephyr repo and modules
- export MODULES_DIR="$CI_PROJECT_DIR/modules"
- - mkdir -p "${MODULES_DIR}"
- export ZEPHYR_BASE="${CI_PROJECT_DIR}/zephyr/main"
+ - mkdir -p "${CI_PROJECT_DIR}/zephyr"
+ - test -d ${EC_DIR}/zephyr/main && mv -T ${EC_DIR}/zephyr/main ${ZEPHYR_BASE}
+ - test -d ${EC_DIR}/modules && mv -T ${EC_DIR}/modules ${MODULES_DIR}
+ # Get Zephyr repo and modules
+ - mkdir -p "${MODULES_DIR}"
- mkdir -p "${ZEPHYR_BASE}"
- test -d "${ZEPHYR_BASE}/.git" || git clone --depth 1 -b main https://chromium.googlesource.com/chromiumos/third_party/zephyr "${ZEPHYR_BASE}"
- test -d "${MODULES_DIR}/cmsis" || git clone --depth 1 -b chromeos-main https://chromium.googlesource.com/chromiumos/third_party/zephyr/cmsis "${MODULES_DIR}/cmsis"