From 0ce311fdbcb43d883c272c9ebc27f43e9b185753 Mon Sep 17 00:00:00 2001 From: Jonas Schwartz Date: Mon, 14 Jan 2019 21:07:26 +0100 Subject: [PATCH 1/7] Renaming Dockerfile --- Dockerfile => web.Dockerfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Dockerfile => web.Dockerfile (100%) diff --git a/Dockerfile b/web.Dockerfile similarity index 100% rename from Dockerfile rename to web.Dockerfile From 9a58615ae9827d957367e30c3aee79e0c2016c75 Mon Sep 17 00:00:00 2001 From: Jonas Schwartz Date: Mon, 14 Jan 2019 21:13:08 +0100 Subject: [PATCH 2/7] Adding circleci config --- .circleci/config.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..76a54dcb --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,36 @@ +version: 2 + +jobs: + deploy: + docker: + - image: joscio/cloud2-build:v0.1.0 + steps: + - add_ssh_keys: + fingerprints: + - $CLOUD2_SSH_FINGERPRINT + - checkout + - run: + name: Push to Git + command: | + ssh-keyscan -H git.code.vapor.cloud >> ~/.ssh/known_hosts + git config --global user.email "jonas+deploy@vapor.codes" + git config --global user.name "Auto deploy" + git commit --allow-empty -m "Trigger deployment" + #git pull origin master + git push -q -f git@git.code.vapor.cloud:auto-deploy.git master + - run: + name: Login to Toolbox + command: vapor-beta cloud login --email $CLOUD2_EMAIL --password $CLOUD2_PASSWORD + - run: + name: Push to Vapor Cloud 2 + command: vapor-beta cloud deploy -y --app auto-deploy --env production + +workflows: + version: 2 + deploy: + jobs: + - deploy + #- deploy: + # filters: + # branches: + # only: master From c6dbb909cc6f2c77b8639426bf31481ddeaed4b4 Mon Sep 17 00:00:00 2001 From: Jonas Schwartz Date: Mon, 14 Jan 2019 21:26:38 +0100 Subject: [PATCH 5/7] Add test --- .circleci/config.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 76a54dcb..3ae70df0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,10 @@ version: 2 jobs: + test: + steps: + - checkout + - run: docker build -f web.Dockerfile . deploy: docker: - image: joscio/cloud2-build:v0.1.0 @@ -29,8 +33,10 @@ workflows: version: 2 deploy: jobs: - - deploy - #- deploy: - # filters: - # branches: - # only: master + - test + - deploy: + requires: + - test + filters: + branches: + only: master From cdc7ba61af8d14fdf21d3adf1f3900a17baac64f Mon Sep 17 00:00:00 2001 From: Jonas Schwartz Date: Mon, 14 Jan 2019 21:27:18 +0100 Subject: [PATCH 6/7] Add test --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3ae70df0..16220597 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,6 +2,7 @@ version: 2 jobs: test: + machine: true steps: - checkout - run: docker build -f web.Dockerfile . From 7f34d29ba723bdec274fa652c08b622c05b12b7b Mon Sep 17 00:00:00 2001 From: Jonas Schwartz Date: Mon, 14 Jan 2019 21:28:54 +0100 Subject: [PATCH 7/7] Add test --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 16220597..07336261 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,7 @@ jobs: git config --global user.email "jonas+deploy@vapor.codes" git config --global user.name "Auto deploy" git commit --allow-empty -m "Trigger deployment" - #git pull origin master + git pull origin master git push -q -f git@git.code.vapor.cloud:auto-deploy.git master - run: name: Login to Toolbox