Jenkins Made Simple
Create ./ansible/group_vars/jenkins_credentials.yml and with the credentials to what you desire.
Use ./ansible/group_vars/jenkins_credentials.TEMPLATE.yml as a starting point.
TIP: Since this file stores sensitive information, consider storing this file in a secured location and keeping it here only when SimpleJenkins is being configured with passwords
Execute the following command:
ansible-playbook ansible/playbooks/deploy-config_standard.yml# `sudo` must be used for the default usage of docker
# _NOTE_: --build is meant to make sure that the image is built (since we're using a custom image that supports plugins.txt)
sudo docker compose up --build -d# `sudo` must be used for the default usage of docker
sudo docker compose down- Open your browser, navigate to the URL
http://<jenkins-host-ip>:8080/jenkins/ - Use the
adminpassword that you had set up with./ansible/group_vars/jenkins_credentials.yml - TIP: Using Jenkins without a reverse proxy is not recommended since network traffic is not secured. If you want a quick and easy reverse proxy setup, consider using SimpleNginx
- Login as an admin user
- Navigate to
${JENKINS_URL}/manage/configuration-as-code/(e.g. https://127.0.0.1/jenkins/manage/configuration-as-code/) - Click on the
View Configurationbutton to view and/or extract the CasC with your current changes. - (Optional): You may click on the
Download Configurationbutton to download it wherejenkins.yamlis at. (Not recommended if you're new to using this repo, since it will overwrite your current configuration) - Remove and/or template certain variables in the new CasC YAML config. (e.g.
unclassified.location.urlto help allow Jenkins to avoid a hardcoded Jenkins URL)
- Login as an admin user
- Navigate to
$(JENKINS_URL)/manage/script/(e.g. https://127.0.0.1/jenkins/manage/script/) - Execute the following:
// Get the array of plugins from jenkins plugin manager, sort it, and then print out each plugin with its corresponding name and verion
def array_of_plugins = new ArrayList(Jenkins.instance.pluginManager.plugins)
.sort { it.shortName }
.each { println("${it.shortName}:${it.version}") }
// This print function removes the "Result: [...]" at the very end, which is undesirable when wanting an output that ou can readily copy-paste to plugins.txt
println("")- Copy the output of the
Script Console - Place the output into repo/plugins.txt
Documentation on Jenkins Docker: https://github.com/jenkinsci/docker/blob/master/README.md
Documentation on Jenkins Pipeline: https://www.jenkins.io/doc/book/pipeline/