安装jenkins with brew

招晓贤

AI engine @ Facebook

基本概念

跟新 brew install 速度

https://www.jianshu.com/p/c7c7aa34e579

步骤一

cd "$(brew --repo)" git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

步骤二

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git

#步骤三 brew update

注意这里需要等待一会,因为要更新资源。 更新完后使用brew update,brew install速度变快很多了,不会卡在那半天没动静,替换镜像完成。

复原方法

步骤一

cd "$(brew --repo)" git remote set-url origin https://github.com/Homebrew/brew.git

步骤二

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://github.com/Homebrew/homebrew-core

#步骤三 brew update

复原方法

步骤一

cd "$(brew --repo)" git remote set-url origin https://github.com/Homebrew/brew.git

步骤二

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://github.com/Homebrew/homebrew-core

#步骤三 brew update

安装jenkins

brew jenkins

怕一次安装不成功,可以循环安装 while ! brew install jenkins ; do sleep 60 ; done ; echo succeed // while ! brew install jenkins ; do sleep 60 ; done ; brew services start jenkins

while ! docker build -t deploy . ; do sleep 60 ; done ; echo succeed

启动服务: brew services start jenkins

安装成功后,登录

http://localhost:8080/login?from=%2F

复制密码, 输入

cat /Users/flybird/.jenkins/secrets/initialAdminPassword

删除服务 brew services stop jenkins brew uninstall jenkins --force brew cleanup rm -rf /Users/flybird/.jenkins

-----BEGIN OPENSSH PRIVATE KEY----- b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn NhAAAAAwEAAQAAAQEAtLH+N04cLF/6i5mDoaVyM5nPsnyspG+1ERnaF7GuvHel//a7KuQa nGNYOswjSWzraCGSyp7Il3I3o0gho560qqoFqbMhJlboFrl3tTatGL0rXdEoN1qSRfkPaY O7zM264AGPJzPDIel197zflxNqNj1sexXP3X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