MacBook-Pro:~ sunyifeng$ brew search jenkins
==> Searching local taps...
jenkins jenkins-job-builder jenkins-lts
==> Searching taps on GitHub...
caskroom/cask/jenkins-menu
==> Searching blacklisted, migrated and deleted formulae...
If you meant "jenkins" specifically:
It was migrated from caskroom/cask to homebrew/core.
MacBook-Pro:~ sunyifeng$ brew install jenkins
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (homebrew/core, pivotal/tap, caskroom/cask).
==> New Formulae
annie gitlab-gem jsonrpc-glib patchelf tox
apache-arrow-glib gr-osmosdr libdazzle phplint trezor-agent
aws-es-proxy hcloud mkl-dnn ssh-permit-a38 util-linux
cquery jrtplib netdata template-glib
==> Updated Formulae
libtiff ✔ gdk-pixbuf ocrmypdf
pivotal/tap/springboot ✔ geckodriver odpi
sqlite ✔ gedit offlineimap
tomcat ✔ gegl open-scene-graph
vim ✔ getmail openimageio
abcmidi ghostscript openssh
abnfgen gist openttd
abyss git openvdb
afsctool git-annex optipng
agda git-sizer osm2pgrouting
allegro git-town osquery
amqp-cpp gitbucket packmol
angular-cli gitfs paket
apache-geode gitg pam_yubico
apibuilder-cli gitless pango
apktool gjs passenger
arangodb glade pcb
armor glib pdal
artifactory globus-toolkit percona-server-mongodb
asciinema gnome-builder [email protected]
asio gnupg pgcli
aspectj go-jira pgroonga
at-spi2-atk [email protected] php
at-spi2-core gobject-introspection [email protected]
atk goenv [email protected]
aws-sdk-cpp gollum phpunit
awscli google-benchmark picard-tools
azure-cli grails pick
babeld graphene pioneers
babl gron pipenv
bazel groonga pivotal/tap/gemfire
bcftools grpc pivotal/tap/pivnet-cli
bcpp gsoap pivotal/tap/tcserver
bedops gst-plugins-good plantuml
bettercap gtksourceview3 poco
bibtex2html handbrake postgis
binaryen haproxy pqiv
bit harfbuzz presto
bitcoin heroku proguard
bitrise htmldoc proj
botan htop pstoedit
braid htslib pugixml
brotli hugo py2cairo
byteman i2p py3cairo
c14-cli imlib2 pycodestyle
calicoctl influxdb qd
certbot internetarchive qpid-proton
chakra ipython qscintilla2
chapel ipython@5 qtfaststart
checkstyle ircd-hybrid rancher-cli
chronograf jansson raylib
cimg jena re2
clamav jenkins recoverjpeg
cliclick jenkins-job-builder remctl
clinfo jenkins-lts robot-framework
clojure jhipster rocksdb
closure-compiler json-glib saltstack
cockatrice keychain samtools
cockroach knot sbt
cocoapods kops scm-manager
collectd kubectx sdb
composer kubeless sfk
conan kubernetes-cli silk
conjure-up launch singular
consul lbdb skaffold
container-diff lcdf-typetools skafos
convox libcouchbase softhsm
coreos-ct libdill solr
couchdb libgit2 sops
cppcheck libgit2-glib sourcekitten
cryptopp libgpg-error sourcery
cython libgweather sox
darcs libhttpseverywhere sparse
dartsim liblwgeom spigot
davmail libmagic sqldiff
dbhash libphonenumber sqlite-analyzer
dcos-cli libqalculate sqliteodbc
ddgr librealsense sqlmap
dependency-check libressl src
di librsvg srt
discount libsoup ssh-copy-id
django-completion libsoxr sshuttle
dmd libspectre subversion
dnscrypt-proxy libuv svgcleaner
dnsdist libvirt swift
docfx libzip swiftlint
docker linkerd syncthing
docker-completion links sysbench
docker-compose lldpd talloc
docker-compose-completion lmod tbb
docker2aci log4cplus teleport
doctl lolcat terraform
dscanner lxc terragrunt
dub mapnik testssl
duck maxwell timelimit
duti mediaconch tinyxml2
embulk mednafen tippecanoe
emscripten mercurial tmux
erlang@19 metabase todo-txt
evince mill tup
exomizer miniupnpc txr
exploitdb mint uhd
eye-d3 mitmproxy unbound
faas-cli mkvtoolnix vala
fail2ban mm-common vault
ffmbc modd vte3
fibjs monero watch
fig2dev mongo-c-driver webpack
file-formula mutt wildfly-as
firebase-cli mypy wine
fits nanopb-generator wireguard-tools
flatbuffers nats-streaming-server wireshark
flawfinder ncmpc xonsh
flow ncmpcpp xrootd
fluent-bit nco xtensor
fn neofetch yarn
fobis nghttp2 yash
folly nginx yaws
fonttools nifi yle-dl
fq node you-get
freetds nomad youtube-dl
frege notmuch zabbix
frugal nss zenity
futhark ntl znapzend
gcab nuget zsh
gdcm nvm
==> Renamed Formulae
php70 -> [email protected]
==> Deleted Formulae
arm
==> Downloading http://mirrors.jenkins.io/war/2.117/jenkins.war
==> Downloading from http://mirrors.tuna.tsinghua.edu.cn/jenkins/war/2.117/jenkins.war
######################################################################## 100.0%
==> jar xvf jenkins.war
==> Caveats
Note: When using launchctl the port will be 8080.
To have launchd start jenkins now and restart at login:
brew services start jenkins
Or, if you don't want/need a background service you can just run:
jenkins
==> Summary
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew cask install java
brew install jenkins
java -jar /usr/local/Cellar/jenkins/2.49/libexec/jenkins.war --httpPort=8080
//2.49是指Jenkins的版本号
ln -sfv /usr/local/opt/jenkins/*.plist ~/Library/LaunchAgents
launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
打开浏览器,输入 localhost:8080 就可看到Jenkins的web界面
若提示org.jenkins-ci.plist文件未找到,手动创建即可
sudo touch /Library/LaunchDaemons/org.jenkins-ci.plistplist内容(具体内容根据不同设备可能需要稍作更改):
xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>Labelkey>
<string>Jenkinsstring>
<key>ProgramArgumentskey>
<array>
<string>/usr/bin/javastring>
<string>-jarstring>
<string>/usr/local/Cellar/jenkins/2.49/libexec/jenkins.warstring>
array>
<key>OnDemandkey>
<false/>
<key>RunAtLoadkey>
<true/>
<key>UserNamekey>
<string>adminstring>
dict>
plist>
在浏览器中输入:http://localhost:8080 (因为在安装时,我设置的端口是8080)
初次打开,会需要进行插件安装
输入密码进入:
会有登录的提示:
点击我们的项目名称,然后点击配置。
在第一次创建的时候,会要选择构建的对象,我ios选的就是xcode,如果找不到xcode选项,就要回到首页的“系统管理”中的“管理插件”中安装“Xcode integration”这项。然后回过来选择Xcode项。
代码拉取完成后,如下图:
这里测试平台以fir.im为例;
然后回到项目配置的页面。
如何查看team ID:
jenkins没有自带的fir插件,要自己到fir官网下载后,手动的添加进去。点击查看
fir.im的token值生成:
进入官网,按照以下步骤,复制即可。