From 7cbcfbc32dd94ba29c4cd6e2fc7a86b93a392790 Mon Sep 17 00:00:00 2001 From: avipuder Date: Thu, 16 Feb 2017 22:01:17 +0200 Subject: [PATCH 1/4] fix dc --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index b0b8a79a..2297b472 100644 --- a/circle.yml +++ b/circle.yml @@ -6,7 +6,7 @@ machine: dependencies: pre: - - sudo pip install docker-compose + - sudo pip install docker-compose==1.9.0 test: override: From 5d0d6710cdf70bb3a898ae199ffbdad7089ad6e3 Mon Sep 17 00:00:00 2001 From: avipuder Date: Thu, 16 Feb 2017 22:07:57 +0200 Subject: [PATCH 2/4] testing1 --- app/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test.py b/app/test.py index f5982c22..6b4a47bd 100644 --- a/app/test.py +++ b/app/test.py @@ -8,7 +8,7 @@ def setUp(self): def test_save_value(self): response = self.app.post('/', data=dict(submit='save', key='2', cache_value='two')) - assert response.status_code == 200 + assert response.status_code == 201 assert b'2' in response.data assert b'two' in response.data From 3ea0e5e0a54296f10a02598370672afc7a25e6b1 Mon Sep 17 00:00:00 2001 From: avipuder Date: Thu, 16 Feb 2017 22:12:19 +0200 Subject: [PATCH 3/4] u-testing1 --- app/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test.py b/app/test.py index 6b4a47bd..f5982c22 100644 --- a/app/test.py +++ b/app/test.py @@ -8,7 +8,7 @@ def setUp(self): def test_save_value(self): response = self.app.post('/', data=dict(submit='save', key='2', cache_value='two')) - assert response.status_code == 201 + assert response.status_code == 200 assert b'2' in response.data assert b'two' in response.data From c77ce6182c519e126f14b709daf23138f940aedc Mon Sep 17 00:00:00 2001 From: avipuder Date: Thu, 16 Feb 2017 22:27:34 +0200 Subject: [PATCH 4/4] add deploy --- circle.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/circle.yml b/circle.yml index 2297b472..d9a0e8e1 100644 --- a/circle.yml +++ b/circle.yml @@ -12,3 +12,14 @@ test: override: - docker-compose up -d - docker-compose run dockerapp python test.py + +deployment: + hub: + branch: [fix-for-ci] + commands: + - docker login -e $DOCKER_HUB_EMAIL -u $DOCKER_HUB_USER_ID -p $DOCKER_HUB_PWD + - docker tag dockerapp_dockerapp $DOCKER_HUB_USER_ID/dockerapp:$CIRCLE_SHA1 + - docker tag dockerapp_dockerapp $DOCKER_HUB_USER_ID/dockerapp:latest + - docker push $DOCKER_HUB_USER_ID/dockerapp:$CIRCLE_SHA1 + - docker push $DOCKER_HUB_USER_ID/dockerapp:latest +