I've never done any CI work before, so I'm struggling to decide how to set up Jenkins as my first project at my new job.
From what I (sort of) understand:
Jobs are the generic work unit
Pipelines are like a job but are defined from a series of steps from scripts stored in a VCS repo
Matrix is like a job, but you can define axes to execute commands across
The basic setup for my project is 2 git repositories serving 3 platforms (one Windows, one Mac/Unix), each of which has 3 branches for different phases (so 9 builds total). The team wants something that will automate builds from each branch as things are committed to them, and then run some tests (which I'm also going to write). There are 2 machines dedicated to each branch. This will not include any kind of general deployment. It'll only be to the test machines.
I've set up a Jenkins master server that each branch stack connects to. I have 3 jobs set up at the moment targets a label I've assigned to the test machines, since I'm just testing with one branch for each platform. Each job uses the "run script" option, and contains something like:
# sets up the required authentication
$SLAVE_HOME/pre-build.sh
# then run the build script
./build.sh
# then a post-build/install script that automates installation of the packages,
# runs the product, and verifies it's started properly.
$SLAVE_HOME/install.sh
The scripts are unique to platform, and may eventually be unique to branch depending on if build steps change
I'll also need to integrate testing at some point - I'm planning to try using SikuliX for mac/unix and either that or Selenium+Winium for Windows. This will include aggregating results and build status to post on a not-yet-written monitoring page. That will add another couple platform-specific "global" steps.
Setting up 9 jobs that are very similar feels like I'm doing something wrong. I've considered a matrix per platform with branch axis, but I'll also need to report on build status/outputs, and having 6 outputs tied into one job might be problematic. Tests may also differ between branches as features are changed.