Goal: repeat the same workflow as https://github.com/AlexVeprev/github_actions_demo_project
Status: done
-
Configure 2-3 or more VMs:
- For Jenkins controller (master).
- For Jenkins agent(s).
- For Docker server(s), i.e. Docker Cloud (item 4 below and option 3 in
Jenkinsfile
).
-
Install Jenkins controller. E.g. using Docker. Follow this instruction, skip running
docker:dind
.Install additional plugins:
-
Configure Jenkins agent(s):
- Install jre and docker.
- Create user "jenkins", allow him to use Docker.
- Create ssh-key pair (doesn't matter what host to use for this) and store public key in ~/.ssh/authorized_keys of Jenkins agent, add private key as Credential using Jenkins UI (Manage Credentials).
- Configure agent through Jenkins UI.
-
As alternative (or addition) to statically configured Jenkins agent(s) from item 3 configure Docker Cloud using Jenkins Docker Plugin to create Jenkins agents dynamically:
- Install Docker to host and configure it.
- Prepare Docker images for dynamic runners, images should contain jre (see examples in
jenkins/Dockerfile.agent_*
). - Configure Docker Cloud through Jenkins UI.
-
Create project for GitHub; you'll need to add personal access token and some other secrets (see Jenkinsfile) to Credentials.
TODOs:
- Prepare more precise Dockerfile for Jenkins controller with all the needed plugins.
- Prepare more optimized (from size perspective) Docker images for builder and testers (including images with for dynamic agents).
- Describe steps more precisely where makes sense.