blob: ab5c45f32a909de17f628bb4f0e2cac40de74356 [file] [log] [blame]
Gary Wu213a8352017-06-16 13:44:28 -07001#!/bin/sh
2
3sed -i 's|archive\.ubuntu\.com|mirrors.ocf.berkeley.edu|g' /etc/apt/sources.list
4
5echo "192.168.33.1 nexus-proxy" >> /etc/hosts
6
7
8cat >> /etc/inputrc <<EOF
9set show-all-if-ambiguous on
10set show-all-if-unmodified on
11set match-hidden-files off
12set mark-symlinked-directories on
13EOF
14
15
16apt-get update
17apt-get -y install git
18git config --global user.email "gary.i.wu@huawei.com"
19git config --global user.name "Gary Wu"
20apt-get -y install curl openjdk-8-jdk maven unzip
21
22# install Jenkins
23wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
24sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
25apt-get update
26apt-get -y install jenkins jenkins-job-builder python-pip
27
28apt-get -y install docker.io
29sudo usermod -aG docker ubuntu
30sudo usermod -aG docker jenkins
31
32su -l jenkins -c "/vagrant/jenkins-init-1.sh"
33
34sudo systemctl restart jenkins
35sleep 5
36
37su -l jenkins -c "/vagrant/jenkins-init-2.sh"
38
39sudo systemctl restart jenkins
40sleep 5
41
42su -l jenkins -c "/vagrant/jjb-init.sh"
43