This repo package Jenkins and other software, such as: maven, docker, nodejs, kubectl, helm v3 and other Jenkins plugins, see plugins.txt
This Jenkins has the required tools to work in and with Kubernetes
- Jenkins' application with pre-loaded plugins (see plugins.txt)
- Skipped setup wizard
- You can control admin user and password with
-e ADMIN_USER=<your_admin_user> -e ADMIN_PASSWORD=<password>
- You can add and remove plugins by editing the plugins.txt file
- You can control admin user and password with
- Docker for managing a Docker CI lifecycle
kubectl
command line client for working with the Kubernetes API **should mountkube config
file to usekubectl
- tag: 20210107
- version:
- node: 14.x
- kubectl: v1.20.1
- helm: v3.3.4
You can pull an already built version of this Jenkins image from docker hub
.
# Pull the image
$ docker pull imwower/jenkins-in-kubernetes
You can build the image yourself
$ git clone https://github.com/imwower/jenkins-in-kubernetes.git
# Build the image
$ docker build -t jenkins -f Dockerfile \
--build-arg NODE_VERSION="14.x" \
--build-arg KUBECTL_VERSION="v1.20.1" \
--build-arg HELM_VERSION="v3.3.4" \
.
# Push the image
$ docker push jenkins
You can run your container locally, if you have Docker installed
$ docker run -d --name jenkins -p 8080:8080 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /<your_jenkins_path>:/var/jenkins_home \
-v /<your_maven_m2_path>:/root/.m2 \
-v /<your_k8s_config_file>:/root/.kube/config \
-e ADMIN_USER=<your_admin_user> \
-e ADMIN_PASSWORD=<password>
jenkins
- Browse to http://localhost:8080 on your local browser
$ mvn -v
$ node -v
$ npm -v
$ docker -v
$ kubectl version
$ helm version