Git production publishing

1.- Clone (mirror) your repository in the production server

cd ~
git clone –mirror git@bitbucket.org:<username>/<reponame>.git

2.- Checkout to www folder:

cd ~/.git
GIT_WORK_TREE=/home/<username>/www git checkout -f production

3.- Once changes are in the shared repository

git fetch
GIT_WORK_TREE=/home/<username>/www git checkout -f

You can setup a webhook in bitbucket so this happens automatically, but i have to figure out yet how to handle the database updates.

Full article:

http://jonathannicol.com/blog/2013/11/19/automated-git-deployments-from-bitbucket/

Leave a comment

Filed under Technical Links

delete repeated records from sql

with table1 as (

select a,b,c,

count(*) over (partition by b) ct, — ct will count how many rows have duplicated b

row_number() over (partition by b order by b) as rn –rn will add a row number per partition so you can filter where rn>1

from tableX

)

Select * from table1 where rn > 1

Leave a comment

Filed under Technical Links

Data driven unit test

https://msdn.microsoft.com/en-us/library/ms182527.aspx

http://www.codeproject.com/Articles/710072/Data-driven-troubles

Leave a comment

Filed under Technical Links

nodejs visualstudio build tools issue when installing protractorjs

npm install socket.io –msvs_version=2013

Leave a comment

Filed under Technical Links

structure map time expiring object cache

http://notherdev.blogspot.com/2014/06/structuremap-time-expiring-objects-cache.html

Leave a comment

Filed under Technical Links

git development release deployment branching

https://www.atlassian.com/git/

https://www.atlassian.com/git/tutorials/

http://nvie.com/posts/a-successful-git-branching-model/

Leave a comment

Filed under Technical Links

exploring microservices in docker and microsoft azure

https://channel9.msdn.com/Series/Exploring-Microservices-in-Docker-and-Microsoft-Azure/01?wt.mc_id=EntriesInArea

https://channel9.msdn.com/Series/Exploring-Microservices-in-Docker-and-Microsoft-Azure/02?wt.mc_id=EntriesInArea

https://channel9.msdn.com/Series/Exploring-Microservices-in-Docker-and-Microsoft-Azure/03?wt.mc_id=EntriesInArea

https://channel9.msdn.com/Series/Exploring-Microservices-in-Docker-and-Microsoft-Azure/04

Leave a comment

Filed under Technical Links