Roots Discourse

Automated deployment

Anybody could give me any pointers on where to start for automatic deployments?

Let’s say I would like every commit to github to be automatically deployed to my staging server?

1 Like

You would need some type of continuous integration or continuous delivery server set up.

A lot of people use GitLab’s CI server, or Codeship, or another paid CI/CD service to run Ansible commands on successful commits.

2 Likes

Definitely will look into Gitlab’s CI server. Looks interesting… And free!?!

Thanks! :metal:

You ever get this setup? Looking to do the same!

No I did not, yet … haha.

If anyone has I’d love to see a walkthrough of how you did it-- currently working on it myself but only have time here and there.

After setting up the gitlab-ci-multi-runner “shell” on my macos, I am able to trigger a deploy when a commit is pushed to my develop branch. If that can help you start. I’d be curious to see a more complete .gitlab-ci.yml if someone has one to share.

before_script:

  • “cd trellis && ansible-galaxy install -r requirements.yml”

deploy_dev:
script: "./deploy.sh production dev.example.com"
only:
- develop

3 Likes

Hey,

It would be nice if someone could make a tutorial on how to setup GitLab CI with Trellis. It would be awesome addition intro Trellis workflow.

Maby someone has links where is enough info about setting it up? I would be willing to create a tutorial for Trellis, maby even a video. Cheers!

We have open sourced our CircleCI config at https://github.com/ItinerisLtd/circleci-orbs-wordpress/blob/74f1609f16c1da5eff872f4ba20525d6ecde7bd4/src/tiller-circleci/orb.yml and the Dockerfile at https://github.com/ItinerisLtd/circleci-orbs-wordpress/blob/74f1609f16c1da5eff872f4ba20525d6ecde7bd4/src/tiller-circleci/Dockerfile You might want to convert them into GitLab CI ones.

Tips: Make sure you setup the SSH keys correctly.

1 Like