Author Topic: Jenkins for personal projects  (Read 11165 times)

ober

  • Ashton Shagger
  • Ass Wipe
  • Posts: 14337
  • Karma: +73/-790
  • mini-ober is taking over
    • Windy Hill Web Solutions
Jenkins for personal projects
« on: July 07, 2017, 08:34:26 AM »
So I'm not sure what the possibilities are but I figured I'd ask you guys in case you've done anything similar.  I'd like to automate deployments for my personal projects that I do.  In an ideal world, I'd have Jenkins running either locally or on my web host.  I currently have a reseller hosting account, so I'm limited on what I can install.  What I would ideally like is to have it running on my local machine at home and have it package up a repo on bitbucket and deploy that.  The only thing I'm unsure about is dependencies (my vendor folder).  I assume I could trigger bower/composer from Jenkins on the remote server? 


Maybe I'm asking too much.  I guess I could install Jenkins on the server where the deploy is being done but that seems like a security risk.


Have any of you done this?  Any thoughts?  These are PHP projects by the way.

micah

  • A real person, on the Internet.
  • Ass Wipe
  • Posts: 6915
  • Karma: +58/-55
  • Truth cannot contradict truth.
    • micahj.com
Re: Jenkins for personal projects
« Reply #1 on: July 07, 2017, 08:54:08 AM »
I have not used Jenkins personally.  We've talked about it for various things at work but never got around to doing anything I don't think (that might not be entirely true, I think my coworker had it set up to do some automated QA tasks)

What is your current deployment process?   At work we use beanstalkapp.com and for my side hustle I use a combo of bitbucket and deployhq.com.  I tend to do the composer stuff locally and check the vendor folders into my git repo.  But that may not be how the cool kids do it.
"I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.  I use it to look at pictures of cats and get in arguments with strangers."

ober

  • Ashton Shagger
  • Ass Wipe
  • Posts: 14337
  • Karma: +73/-790
  • mini-ober is taking over
    • Windy Hill Web Solutions
Re: Jenkins for personal projects
« Reply #2 on: July 07, 2017, 09:19:02 AM »
For my personal projects, I'm basic AF.  I just FTP the changes up to the server.  All of my clients have a staging location on their server where I deploy the changes for them to test and then when they green light the changes, I just copy them over to the production site.  Most have a separate DB for each site but I have one that shares a DB between the dev site and prod which requires me to add flags to some of the data so it only appears in specific locations.  That one is my oldest project.  I don't do that stuff anymore.

I want to get more automated, hence the thread.  On one of my newer projects I do not currently check the vendor folder into the repo.  I initially ran composer/bower directly on the server for the initial deploy but I have been just FTPing the more recent changes because something got out of sync.

I'll check out deployhq.com.  Thanks ;)

micah

  • A real person, on the Internet.
  • Ass Wipe
  • Posts: 6915
  • Karma: +58/-55
  • Truth cannot contradict truth.
    • micahj.com
Re: Jenkins for personal projects
« Reply #3 on: July 07, 2017, 09:38:39 AM »
I'd also add that for my personal websites I just use GIT for everything.  I develop "locally" (I do all my PHP dev using cloud9) and push to bitbucket.  Then I shell into my webhost machine and git pull the master branch.  its not automated but it works.
"I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.  I use it to look at pictures of cats and get in arguments with strangers."

ober

  • Ashton Shagger
  • Ass Wipe
  • Posts: 14337
  • Karma: +73/-790
  • mini-ober is taking over
    • Windy Hill Web Solutions
Re: Jenkins for personal projects
« Reply #4 on: July 07, 2017, 10:40:55 AM »
Yeah, I've considered going that route as well.  The only problem is that I have multiple config files (one for each environment: local dev, web test, and production).  I guess I could code it to use the right config file based on URL or something.  Or maybe pull the config file out of the build completely?

micah

  • A real person, on the Internet.
  • Ass Wipe
  • Posts: 6915
  • Karma: +58/-55
  • Truth cannot contradict truth.
    • micahj.com
Re: Jenkins for personal projects
« Reply #5 on: July 07, 2017, 10:47:56 AM »
I keep my config out of the repo and maintain it separately on each environment.   I think the "right" way to do it is to use $_ENV variables all in one config locations (ideally, outside the root of your web accessible site) but I've never really gotten myself up to speed on how to really implement that.
"I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.  I use it to look at pictures of cats and get in arguments with strangers."

ober

  • Ashton Shagger
  • Ass Wipe
  • Posts: 14337
  • Karma: +73/-790
  • mini-ober is taking over
    • Windy Hill Web Solutions
Re: Jenkins for personal projects
« Reply #6 on: July 07, 2017, 11:57:15 AM »
Yeah, I should do that.  My config files are pretty simple.  Mainly just DB credentials and error reporting levels.

Mike

  • Jackass In Charge
  • Posts: 11270
  • Karma: +168/-32
  • Ex Asshole - a better and more caring person.
Re: Jenkins for personal projects
« Reply #7 on: July 07, 2017, 03:59:36 PM »
Sorry, haven't had time to read this entire thread.  Have you looked at Travis CI?  It is basically Jenkins as a service but I don't know all of what it can support.  It isn't free for non-OS projects.

ober

  • Ashton Shagger
  • Ass Wipe
  • Posts: 14337
  • Karma: +73/-790
  • mini-ober is taking over
    • Windy Hill Web Solutions
Re: Jenkins for personal projects
« Reply #8 on: July 07, 2017, 10:46:31 PM »
99% of my use would be non-OS so that's out. I did look at Shippable and a few others. Most of this stuff is overkill for me as a single developer. Even my last project where I subcontracted part of it, it wasn't bad to manually manage and deploy.

hans

  • Guitar Addict
  • Jackass In Charge
  • Posts: 3539
  • Karma: +46/-18
Re: Jenkins for personal projects
« Reply #9 on: July 09, 2017, 10:03:45 PM »
I might actually take a look at Gitlab. It has quite a growing feature set and I've been moving all of my personal projects over to the public offering lately. My current client uses the enterprise version of it too which is a first I've seen. You can do CI with it as well that's pretty straightforward. In theory you could probably get by with the hosted offering and perhaps a private runner to keep sensitive stuff private.

Maybe check out the community edition and see if that might work for you if the hosted version won't.
This signature intentionally left blank.