sunrisemovement / devops

This repo is obsolete. A maintained version of this code lives at https://github.com/maximum-ethics/linode-caddy
GNU Affero General Public License v3.0
2 stars 1 forks source link

replicate SF bay hub website #13

Open skyfaller opened 4 years ago

skyfaller commented 4 years ago

It appears that we want to clone only the gh-pages branch which should only contain the public files as produced by Hugo. A command like git clone -b gh-pages --single-branch https://github.com/sunrise-bay-area/sunrise-bay-area.git might do the desired shallow clone.

Version parameter should give us a clone of the correct branch using the Ansible git module, and the depth parameter trims history (to save transfer/space) and also apparently "When you use the –depth flag with clone command, Git assumes the –single-branch flag by default," so using depth should also give us only a single branch's history.

skyfaller commented 4 years ago

This now works in our test environment on brockovich, need to confirm with SF Bay that it doesn't interfere with their CICD pipeline before we can use it in production.

alxmrs commented 4 years ago

The content of the folder that houses the sfbay website should be updated in response to an update to the repo.

Right now, we are scp-ing the contents of the public folder to the aformentioned folder. Will this mess with your system? Or, is this compatible? (My intuition says this is the case.)

Can Ansible respond to events (via webhooks, cicd, actions, etc.)? If so, then we can replace what I've currently go in travis with something better.

skyfaller commented 4 years ago

Two questions:

Ansible can e.g. edit webhooks for jenkins to use, but I don't think it's really designed to handle events itself. Ansible isn't something that runs continuously, it's something that runs on a client when you trigger it, and then it SSHes to your server and does stuff there. I know very little about webhooks, cicd, actions etc., however, so I could be very wrong.