From df51dde7e2989b3eca36e9ebe36a8ab8587d1574 Mon Sep 17 00:00:00 2001 From: BNOPOD Date: Sun, 24 Jul 2022 23:48:00 +0200 Subject: [PATCH] Workspace --- .circleci/config.yml | 54 ++++++++++++++++++++------------------------ app/webroot/php_cms | 1 - 2 files changed, 25 insertions(+), 30 deletions(-) delete mode 160000 app/webroot/php_cms diff --git a/.circleci/config.yml b/.circleci/config.yml index 2b5275eac..11d047ea7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,15 +4,16 @@ aliases: run: name: Install dependencies command: | + git submodule sync + git submodule update --init --recursive apk update \ && apk add \ npm \ php7-session \ && apk del build-base \ && rm -rf /var/cache/apk/* - rm -Rf node_modules/balena-cloud || true - npm install --no-optional - npm link balena-cloud + npm ci + npm link balena-cloud-apps orbs: shellcheck: circleci/shellcheck@1.3.16 jobs: @@ -38,17 +39,21 @@ jobs: working_directory: /var/www/html/ steps: - checkout - - run: - command: git submodule sync - - run: - command: git submodule update --init --recursive - - restore_cache: - key: v1-dependencies-{{ checksum "package-lock.json" }} - restore_cache: - key: v1-dependencies-{{ checksum "composer.lock" }} + keys: + - v1-dependencies-{{ checksum "package-lock.json" }} + - v1-dependencies-{{ checksum "composer.lock" }} - setup_remote_docker: docker_layer_caching: false - *deps + - save_cache: + key: v1-dependencies-{{ checksum "composer.lock" }} + paths: + - app/Vendor + - save_cache: + key: v1-dependencies-{{ checksum "package-lock.json" }} + paths: + - $HOME/.npm - run: name: Set architecture and Setup Environment Variables command: | @@ -72,21 +77,12 @@ jobs: ./test-cake.sh --circle . common.env && cat $MYPHPCMS_DIR/e13/etc/constantes.properties | grep PASSWORD_ADMIN | head -c 18 when: always - - save_cache: - key: v1-dependencies-{{ checksum "composer.lock" }} - paths: - - app/Vendor - - save_cache: - key: v1-dependencies-{{ checksum "package-lock.json" }} - paths: - - node_modules - persist_to_workspace: - root: . + root: app/ paths: - - node_modules - - app/Config - - app/webroot - - app/Vendor + - Config + - webroot + - Vendor compose: docker: - image: betothreeprod/dind-php7 @@ -96,12 +92,12 @@ jobs: - DKR_ARCH: x86_64 steps: - checkout - - run: - command: git submodule sync - - run: - command: git submodule update --init --recursive - - attach_workspace: - at: . + - attach_to_workspace: + at: app + - restore_cache: + keys: + - v1-dependencies-{{ checksum "package-lock.json" }} + - v1-dependencies-{{ checksum "composer.lock" }} - setup_remote_docker: docker_layer_caching: false - *deps diff --git a/app/webroot/php_cms b/app/webroot/php_cms deleted file mode 160000 index bbc9f79dc..000000000 --- a/app/webroot/php_cms +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bbc9f79dcd338b08ecfc13b6456f72f58af7abfd