This repository has been archived by the owner on Dec 10, 2020. It is now read-only.
forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins-slave.packages.sh
executable file
·87 lines (71 loc) · 1.95 KB
/
jenkins-slave.packages.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
83
84
85
86
#!/bin/bash
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
# This script assumes an Ubuntu 16.04 LTS base image.
set -o errexit
set -o pipefail
export DEBIAN_FRONTEND=noninteractive
# Ensure we have `add-apt-repository`.
sudo apt-get -y install software-properties-common
# Pants itself, python backend tests, jenkins-slave-connect.
# ===
sudo add-apt-repository -y --update ppa:fkrull/deadsnakes
PYTHONS=(
# Without this we only have binaries for `python2.7` and `python3`,
# but no `python` link.
python-minimal
# 2.6 is needed for unit tests that exercise platform constraints.
python2.6
python2.6-dev
python2.7
python2.7-dev
python3.5
python3.5-dev
pypy
pypy-dev
)
sudo apt-get -y install ${PYTHONS[@]}
# JVM backend and jenkins-slave-connect.
# ===
sudo add-apt-repository -y --update ppa:openjdk-r/ppa
OPEN_JDKS=(
# Unfortunately there is no headless package for OpenJDK 7.
openjdk-7-jdk
openjdk-8-jdk-headless
openjdk-9-jdk-headless
)
sudo apt-get -y install ${OPEN_JDKS[@]}
sudo add-apt-repository -y --update ppa:webupd8team/java
ORACLE_JDKS=(
oracle-java6-installer
oracle-java7-installer
oracle-java8-installer
)
for jdk in "${ORACLE_JDKS[@]}"; do
echo ${jdk} shared/accepted-oracle-license-v1-1 select true | \
sudo /usr/bin/debconf-set-selections
done
sudo apt-get -y install ${ORACLE_JDKS[@]}
sudo update-java-alternatives --set java-1.8.0-openjdk-amd64
# C/C++ contrib backend.
# ===
sudo apt-get -y install g++
# CI scripts and miscellaneous tasks.
# ===
# NB: Many of these packages come in the base image but are spelled out
# explicity here for completeness.
MISC=(
coreutils # This provides tr, cut, etc.
gawk
grep
sed
curl
wget
openssl # Used for md5 hashing.
perl # Needed by sloccount.
git
)
sudo apt-get -y install ${MISC[@]}
# Finally, top off all our packages.
sudo apt-get -y update
sudo apt-get -y upgrade