-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkins.sh
executable file
·82 lines (59 loc) · 2.46 KB
/
Jenkins.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/bash
# Xcode
echo "Installing Xcode Command Line Tools"
hdiutil mount -noverify xcode_cli.dmg
echo $1 | sudo -S installer -package "/Volumes/Command Line Tools (Mountain Lion)/Command Line Tools (Mountain Lion).mpkg" -target /
umount "/Volumes/Command Line Tools (Mountain Lion)"
echo "Installing Xcode"
hdiutil mount -noverify xcode.dmg
echo $1 | sudo -S cp -R "/Volumes/Xcode/Xcode.app" /Applications
umount "/Volumes/Xcode"
echo "Enabling Mac Developer Mode"
echo $1 | sudo -S /usr/sbin/DevToolsSecurity -enable
echo $1 | /usr/sbin/dseditgroup -o edit -t group -a staff _developer
expect "accept_xcode_license.exp" $1
# Homebrew, git, cocoapods, node
echo "Installing Homebrew"
curl -O https://raw.github.com/mxcl/homebrew/go
expect "accept_homebrew.exp" $1 "go"
echo "Installing git"
brew install git
echo $1 | sudo -S gem update --system
echo "Installing cocoapods"
echo $1 | sudo -S gem install cocoapods
pod setup
echo "Installing node"
brew install node
# Eclipse
echo "Installing Eclipse"
tar -zxf eclipse.tar
mv Eclipse /Applications/Eclipse
# Java
echo "Installing JDK"
hdiutil mount -noverify jdk.dmg
echo $1 | sudo -S installer -package "/Volumes/JDK 7 Update 15/JDK 7 Update 15.pkg" -target /
umount "/Volumes/JDK 7 Update 15"
echo "Installing Java 6"
hdiutil mount -noverify jre6.dmg
echo $1 | sudo -S installer -package "/Volumes/Java for OS X 2013-001/JavaForOSX.pkg" -target /
umount "/Volumes/Java for OS X 2013-001"
echo "Installing Java 7"
hdiutil mount -noverify jre7.dmg
echo $1 | sudo -S installer -package "/Volumes/Java 7 Update 15/Java 7 Update 15.pkg" -target /
umount "/Volumes/Java 7 Update 15"
# Jenkins + Tools
echo "Downloading Latest Version of Jenkins"
cd ~/Downloads
curl -L -o jenkins.pkg http://mirrors.jenkins-ci.org/osx/latest
echo "Installing Jenkins"
echo $1 | sudo -S installer -pkg jenkins.pkg -target /
sleep 20 # wait for Jenkins to boot up
echo "Downloading Jenkins CLI"
curl -L -O http://localhost:8080/jnlpJars/jenkins-cli.jar
echo "Installing Jenkins Plugins"
echo "Installing xcode Plugin"
java -jar jenkins-cli.jar -s http://localhost:8080/ install-plugin https://updates.jenkins-ci.org/latest/xcode-plugin.hpi
echo "Installing git oauth plugin"
java -jar jenkins-cli.jar -s http://localhost:8080/ install-plugin http://updates.jenkins-ci.org/latest/github-oauth.hpi
echo "Installing build timeout plugin"
java -jar jenkins-cli.jar -s http://localhost:8080/ install-plugin http://updates.jenkins-ci.org/latest/build-timeout.hpi -restart