Jenkins is a free and open source automation server. Jenkins helps to automate the non-human part of the software development process, with continuous integration and facilitating technical aspects of continuous delivery. To install Jenkins on MacOS follow below steps:
Step 1: Download Jenkins .war file
Step 2: Copy to the directory of your choice. I am copying from download directory to document directory.
$ cp ~/Downloads/jenkins.war ~/Documents/
Step 3: Type below command
$ java -jar jenkins.war
If you get error related to future version use below command instead
$ java -jar jenkins.war --enable-future-java
Error Snapshot
Mar 06, 2020 12:15:03 AM Main verifyJavaVersion
SEVERE: Running with Java class version 56 which is not in the list of supported versions: [52, 55]. Run with the --enable-future-java flag to enable such behavior. See https://jenkins.io/redirect/java-support/
java.lang.UnsupportedClassVersionError: 56.0
at Main.verifyJavaVersion(Main.java:174)
at Main.main(Main.java:142)
Jenkins requires Java versions [8, 11] but you are running with Java 12 from /Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home
java.lang.UnsupportedClassVersionError: 56.0
at Main.verifyJavaVersion(Main.java:174)
at Main.main(Main.java:142)
Step 4: Password will be generated in Terminal or inside file mentioned in terminal
Step 5: Open URL http://127.0.0.1:8080/ In your case port may be different or you can install on different port if 8080 is busy.
Step 6: Enter Admin Password and continue, you can copy this from terminal or file mentioned in terminal.
Step 7: Select Install Suggested Plugin
Wait for installation to finish.
Step 8: Create First Admin user or Continue as Admin
Step 9: Change instance configuration if needed and click save and finish.
Step 10: Click start using Jenkins.