Stanford-Online/class2go — pull request #727 by sefk (2012-09-19 07:07:11+00:00)
Title: Pull sef-work --> master: fix class2go-deploy method to force branch (#657)

Jason -

The diff for this came out kind of ugly because I reordered some things in the deploy recipe. Best to just look at the resulting file, not the diff.

Added the manual checkout and "force --head HARD" steps as we discussed. Tested and it successfully deployed ```util1.dev```

This was the output when running 'sudo chef-client' (uninteresting):

```
ec2-50-112-26-141.us-west-2.compute.amazonaws.com [2012-09-19T06:54:39+00:00] INFO: execute[git checkout] ran successfully
ec2-50-112-26-141.us-west-2.compute.amazonaws.com [2012-09-19T06:54:39+00:00] INFO: Processing execute[git reset hard] action run (class2go-deploy::default line 46)
ec2-50-112-26-141.us-west-2.compute.amazonaws.com HEAD is now at 703b233 Another multi-tail command for util prod machines
ec2-50-112-26-141.us-west-2.compute.amazonaws.com [2012-09-19T06:54:40+00:00] INFO: execute[git reset hard] ran successfully
```

This was the relevant part of ```knife environment show dev```:

```
main:
admin_email: c2g-dev@cs.stanford.edu
admin_name: Class2Go Development
django_secret: class2go
git_branch: sef-work
instance: dev
production: False
```

And you can see after ward on the ```util1.dev machine``` that we are left on the right branch:

```
DEV ubuntu@ip-10-252-25-135:~/class2go$ git status
# On branch sef-work
nothing to commit (working directory clean)
```