1, install,

brew install jenkins

The brew services stop the brew services start Jenkins Jenkins brew services restart Jenkins another installation blog.csdn.net/u011537073/… Blog.csdn.net/u011537073/…

2. Log in and configure

Modify the configuration

vim /usr/local/opt/jenkins/homebrew.mxcl.jenkins.plist

The XML file

<? The XML version = "1.0" encoding = "utf-8"? > <! DOCTYPE plist PUBLIC "- / / / / DTD plist Apple / 1.0 / EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd" > < plist Version ="1.0"> dict> <key>Label</key> <string> Homebrew.mxcl.Jenkins </string> <key>ProgramArguments</key> <array> < string > / usr/libexec/java_home < / string > < string > -v < / string > < string > 1.8 < / string > < string > - exec < / string > <string>java</string> <string>-Dmail.smtp.starttls.enable=true</string> <string>-jar</string> < string > / usr/local/opt/Jenkins/libexec/Jenkins. War < / string > < string > - httpListenAddress = 127.0.0.1 < / string > <string>--httpPort=8083</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>Copy the code

  1. The LAN uses IP access to Jenkins

Installing Jenkins on BREW avoids many of the user permissions issues associated with other installation methods, but httpListenAddress is set to 127.0.0.1 by default, so that although you can access Jenkins locally with localhost:8080, you can’t access Jenkins locally or locally using IP. The solution is to modify the PLIST configurations in the two paths. And restart the ~ / Library/LaunchAgents/homebrew MXCL. Jenkins. Plist/usr/local/opt/Jenkins/homebrew MXCL. Jenkins. Plist Change the IP address after httpListenAddress to the local IP address or 0.0.0.0.

  1. Local Direct Path Enter the password as prompted. Next, create an account

www.jianshu.com/p/0f828265c…

3. Create projects

www.jianshu.com/p/1268118d4… www.jianshu.com/p/dac1ce3d7…

Post my script

Call the local environment configuration #! /bin/bash-ilex ls CD IMAPPMIOS # iF [! -d./IPADir]; then mkdir -p IPADir; Fi # project absolute path do not know why get project absolute path is not good who knows how to solve please inform thank you! project_path=$(cd `dirname $0`; PWD) project_name=IMAPPMIOS # Scheme name Replace XXX with its own sheme name scheme_name=IMAPPMIOS # Package mode Debug/Release development_mode=Release # build_path build folder path = / Users/KFZX - version /. Jenkins/workspace/ios/IMAPPMIOS/build # file path ExportOptionsPlistPath =${project_path}/ exportoptions. plist # Export. Ipa file path exportIpaPath=/Users/kfzx-version/.jenkins/workspace/ios/IMAPPMIOS/IPADir/ echo "= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =" echo "start packing part" echo "= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =" echo '/ / / -- -- -- -- -- -- -- -- -- -- -' echo '/ / / is clearing engineering' echo '/ / / -- -- -- -- -- -- -- -- -- -- -' xcodebuild \ the clean - configuration ${development_mode} - the -quiet | | exit echo '/ / / -- -- -- -- -- -- -- --' echo '/ / / clean up complete' Echo '/ / / -- -- -- -- -- -- -- --' echo 'echo' / / / -- -- -- -- -- -- -- -- -- -- - 'echo' / / / are compiling engineering: ${development_mode} echo '/ / / -- -- -- -- -- -- -- -- -- -- -' xcodebuild  \ archive -project /Users/kfzx-version/.jenkins/workspace/ios/IMAPPMIOS/${project_name}.xcodeproj \ -scheme ${scheme_name} \ -configuration ${development_mode} \ -archivePath /Users/kfzx-version/.jenkins/workspace/ios/IMAPPMIOS/build/${project_name}.xcarchive -quiet || exit echo '///--------' Echo '/ / / compile complete' echo '/ / / -- -- -- -- -- -- -- --' echo 'echo' / / / -- -- -- -- -- -- -- -- -- -- 'echo' / / / start of ipa package 'echo' / / / -- -- -- -- -- -- -- -- -- -- 'xcodebuild -exportArchive -archivePath ${build_path}/${project_name}.xcarchive \ -configuration ${development_mode} \ -exportPath ${exportIpaPath} \ -exportOptionsPlist /Users/kfzx-version/.jenkins/workspace/ios/IMAPPMIOS/ExportOptions.plist rm -rf Build # FTP upload path, In each version to modify ftp_ipa_dir = "/ data/FTP/mims/download/mimsapp / 2105 test/" ` date + % m % d ` # ipa file output local path ipa_output_dir=$HOME'/Documents/IMAPP/2105/'`date +%m%d` ipa_post_name=IMAPP_C_IOS_`date +%Y%m%d_%H_%M` mkdir -p $ipa_output_dir/$ipa_post_name cp ./IPADir/* $ipa_output_dir/${ipa_post_name}/ mv $ipa_output_dir/${ipa_post_name}/IMAPPMIOS.ipa $ipa_output_dir/${ipa_post_name}/${ipa_post_name}.ipa # Do not know how to dynamically upload files according to the date of the day folder. Ftpserver_ip =122.19.173.70 username= username password= password echo $ftp_ipa_dir FILE_NAME=$ipa_output_dir/${ipa_post_name}/${ipa_post_name}.ipa ftp -n $ftpserver_ip <<! user $username $password mkdir $ftp_ipa_dir cd $ftp_ipa_dir bin put $FILE_NAME ${FILE_NAME##*/} bye EOFCopy the code

4. Plug-in installation

Plug-in management — select the required plug-ins

Jenkins /kpp_upload/ will automatically display the certificate and description file management configuration plug-in keychain plug-in upload login.keychain file click upload has failed no response finally put in. Jenkins /kpp_upload/ will automatically display in their own configuration.

Solution to plug-in download failure

1 upgrade Jenkins

2 Replace the plug-in download source

Select the Advanced TAB

Replace the URL in upgrade Site at the bottom

will

Updates.jenkins-ci.org/update-cent… Replace with

Mirror. Esuni. Jp/Jenkins/upd…

The diagram below:

Jenkins’ mirror address query:Mirrors.jenkins-ci.org/status.html…3 Manual download and upload plug-in Installation Here to install Docker Pipline plug-in as an example to demonstrate manual download and upload plug-in installation:

1. First of all, we can search for plug-ins under system Management on Jenkins

2. Go to Jenkins’ plugin download site

Download the Jenkins plugin at plugins.jenkins. IO /

After clicking enter, you can get the historical plug-in version

Download the plug-in of the corresponding version

3 “Enter Jenkins, enter system management, enter management plug-in, enter advanced, upload plug-in file, and start uploading

“No such plugin: Cloudbees – Folder” error: “No such plugin: Cloudbees – Folder” error: “No such plugin: Cloudbees – Folder” error:

1, open the link “ftp.icm.edu.pl/packages/je…

Download the cloudbees- Folder. hpi directory and put it in Jenkins installation directory \war\ Web-INF \detached-plugins.

The error “No such plugin: Cloudbees – Folder” still appeared after the page was refreshed after steps 1 and 2. It was speculated that the “HPI” file might have been loaded when the project was started and Jenkins service needed to be restarted. Therefore, the following steps were performed:

3. In control Panel – Administrative Tools – Services, find the Jenkins service and restart the service.