Jenkins Plugin for Hugo

Hello everyone:

I contribute a Jenkins plugin for Hugo, if you have some interesting about this, you can try it.

By the way, waiting for your feedback! Thanks!

Nice idea. I’m planning to use jenkins in order to prepare, build and deploy a few sites I have in mind which will be made using hugo. Too bad that your plugin only supports git as I’m using mercurial as version control system together with a self hosted solution for all of my repositories. Looks like I’m out of luck then. Maybe there’s a way to mirror mercurial repos as git repo, but I have to check.

Keep up your work with the plugin.

You can post your process of hugo if have one. So I can do some test, and I wish this plugin can support most of cases.
By the way, Thanks for your reaponse.

My current process utilizes NPM for running the necessary tools to build my site. Jenkins would be the one who starts the build then although I could imagine to move the scripts to the Jenkinsfile and let jenkins run all npm tools. It’s not fully decided how my build process will be but I’ll probably share my experiences at a later time

Sounds like you are in the same place as me. I’m not a developer and I certainly get confused with the various build/runner tools. As I do more JavaScript, I’d be more inclined to use Webpack probably.

It would be interesting to see what, if any benefits there are between Jenkins/Webpack/others from a Hugo build perspective.

If you want to auto build and deploy your hugo site, Jenkins is a great choice. It provide some triggers, like scm, cron. You don’t need to care about the process of build and deploy, if you use the plugin.

Originally I thought about using grunt/gulp but they are more or less only wrappers for tools which can be run with npm too. I don’t need the watch function of gulp as I’m using hugo server and my IDE takes care of compiling less files into CSS so hugo can pick them up. Having said that, my build process will take action after I decide to publish my site so the only thing I need is something to trigger the process on push. My solution I use to host and manage the repositories does have a hook functionality but why reinvent the wheel if jenkins can pull and run automatically.

So, how do you publish your hugo site? By ssh, ftp or just cp cmd.

I already separate the process of build and publish, so if you don’t use git, also can use Jenkins Hugo Plugin to build and publish. You can use ssh publisher, ftp publisher or other ways.