From d2abfe362b89ca958a7c1590fdc9492aa66752c9 Mon Sep 17 00:00:00 2001 From: "Mr. Hyde" Date: Sun, 4 Feb 2018 05:37:11 +0300 Subject: [PATCH] [ci] change workspace folder and checkout on each step --- .circleci/config.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 17de947a..3f302d6a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,11 +3,11 @@ jobs: setup: docker: - image: circleci/node:9 - working_directory: ~/$CIRCLE_PROJECT_REPONAME + working_directory: ~/kotsu steps: - checkout - attach_workspace: - at: ~/$CIRCLE_PROJECT_REPONAME + at: ~/kotsu - run: name: Checkout submodules command: git submodule update --init --recursive @@ -30,10 +30,10 @@ jobs: test: docker: - image: circleci/node:9 - working_directory: ~/$CIRCLE_PROJECT_REPONAME steps: + - checkout - attach_workspace: - at: ~/$CIRCLE_PROJECT_REPONAME + at: ~/kotsu - run: name: test command: npm run test @@ -41,10 +41,10 @@ jobs: build: docker: - image: circleci/node:9 - working_directory: ~/$CIRCLE_PROJECT_REPONAME steps: + - checkout - attach_workspace: - at: ~/$CIRCLE_PROJECT_REPONAME + at: ~/kotsu - run: name: build command: npm run build @@ -54,20 +54,20 @@ jobs: deploy: machine: true - working_directory: ~/$CIRCLE_PROJECT_REPONAME steps: + - checkout - attach_workspace: - at: ~/$CIRCLE_PROJECT_REPONAME + at: ~/kotsu - run: name: Deploy if tests pass and branch is master command: | ssh-keyscan $SERVER_IP > ~/.ssh/known_hosts cat dockerfile.template | envsubst > dockerfile tar cvzf app.tgz dockerfile build/ - scp app.tgz core@$SERVER_IP:~/$CIRCLE_PROJECT_REPONAME.tgz + scp app.tgz core@$SERVER_IP:~/kotsutgz scp deploy.sh core@$SERVER_IP:~/deploy.sh ssh core@$SERVER_IP chmod +x deploy.sh - ssh core@$SERVER_IP ./deploy.sh $CIRCLE_PROJECT_REPONAME $CIRCLE_SHA1 + ssh core@$SERVER_IP ./deploy.sh kotsuCIRCLE_SHA1 workflows: version: 2