Steps to set up Jenkins on your local Mac, create one job and succeed

Overview

The procedure to set up jenkins on the local mac, execute one job, and succeed is described below.

procedure

Install Java

java -version
openjdk version "14.0.2" 2020-07-14
OpenJDK Runtime Environment (build 14.0.2+12-46)
OpenJDK 64-Bit Server VM (build 14.0.2+12-46, mixed mode, sharing)

Homebrew installation

brew -v
Homebrew 2.4.13
Homebrew/homebrew-core (git revision b022a; last commit 2020-08-26)
Homebrew/homebrew-cask (git revision 408c61; last commit 2020-08-26)

Jenkins installation

brew install jenkins

Start Jenkins

brew services start jenkins

Jenkins default settings

vim /usr/local/Cellar/jenkins/2.258/homebrew.mxcl.jenkins.plist
http://localhost:20000/
vim /Users/owner/.jenkins/secrets/initialAdminPassword

Create a new job

Create java file

public class Main{
   public static void main(String[] args){
     System.out.println("Hello World");
   }
}

Creating a shell script

#Move to the hierarchy with the source code
cd /Users/owner/work/study

# Main.Compile java file
javac Main.java

#Program execution
java Main

Run build

Reference site

Recommended Posts

Steps to set up Jenkins on your local Mac, create one job and succeed
Steps to set up Postfix and Dovecot on CentOS 8.3
How to set up and operate jEnv (Mac)
Steps to set up a VNC server on CentOS 8.3
Steps to run docker on Mac
Steps to install Maven on Mac and use it in Eclipse
Steps to run local development of ASP.NET Core on Mac with docker-compose
Minimal steps to set up a Ruby environment with rbenv on Ubuntu 20.04
How to set up and use kapt
Ssh to Ubuntu on VirtualBox on your Mac and do it until you install Docker
[Rails / Routing] Deepen on how to set Prefix and URI to your favorite values and resources
(Ruby on Rails6) How to create models and tables