Build Rails+SPA as a distribution prior to deployment

I have a small but growing Angular application that runs with a Rails backend.

Deployment right now takes a very long time to run because all of the devDependencies have to be installed and then everything has to compiled.

What I’d like to do is have a distribution created for my application, and then that is used to deploy from. I think I’m going to want this anyhow since the application is going to be downloaded by users. I’d rather they not have to deal with installing the mass of npm modules and gems that should only be needed for development if they didn’t have to.

Is Jenkins going to fit the bill here? The tasks I see that need to be accomplished to create a new distribution are:

  • Lint the code with JSHint, Rubocop, Brakeman, …
  • Compile and or compress the JavaScript, Sass, images
  • Run the Karma, Rspec tests
  • Rev the files
  • Clean up any temporary or unnecessary files
  • Create git tag
  • Commit build

Also is it odd to want to commit the builds to a {original}-dist repository?

Git Baby is a git and github fan, let's start git clone.