forked from aws/aws-codebuild-docker-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runtimes.yml
158 lines (149 loc) · 4.94 KB
/
runtimes.yml
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
version: 0.1
runtimes:
java:
versions:
corretto11:
commands:
- echo "Installing corretto (OpenJDK) version 11 ..."
- export JAVA_HOME="$JAVA_11_HOME"
- export JRE_HOME="$JRE_11_HOME"
- export JDK_HOME="$JDK_11_HOME"
- |-
for tool_path in "$JAVA_HOME"/bin/*;
do tool=`basename "$tool_path"`;
if [ $tool != 'java-rmi.cgi' ];
then
rm -f /usr/bin/$tool /var/lib/alternatives/$tool \
&& update-alternatives --install /usr/bin/$tool $tool $tool_path 20000;
fi;
done
corretto8:
commands:
- echo "Installing corretto (OpenJDK) version 8 ..."
- export JAVA_HOME="$JAVA_8_HOME"
- export JRE_HOME="$JRE_8_HOME"
- export JDK_HOME="$JDK_8_HOME"
- |-
for tool_path in "$JAVA_8_HOME"/bin/* "$JRE_8_HOME"/bin/*;
do tool=`basename "$tool_path"`;
if [ $tool != 'java-rmi.cgi' ];
then
rm -f /usr/bin/$tool /var/lib/alternatives/$tool \
&& update-alternatives --install /usr/bin/$tool $tool $tool_path 20000;
fi;
done
default:
commands:
- echo "Installing custom Corretto(OpenJDK) version $VERSION ..."
- export JAVA_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto"
- export JRE_HOME=$JAVA_HOME
- export JDK_HOME=$JAVA_HOME
- yum --disablerepo="*" --enablerepo="AmazonCorretto" -y install java-$VERSION-amazon-corretto-devel
- |-
for tool_path in "$JAVA_HOME"/bin/*;
do tool=`basename "$tool_path"`;
if [ $tool != 'java-rmi.cgi' ];
then
rm -f /usr/bin/$tool /var/lib/alternatives/$tool \
&& update-alternatives --install /usr/bin/$tool $tool $tool_path 20000;
fi;
done
golang:
versions:
1.12:
commands:
- echo "Installing Go version 1.12 ..."
- rm -rf /usr/local/go
- ln -s /usr/local/go12 /usr/local/go
1.13:
commands:
- echo "Installing Go version 1.13 ..."
- rm -rf /usr/local/go
- ln -s /usr/local/go13 /usr/local/go
1.14:
commands:
- echo "Installing Go version 1.14 ..."
default:
commands:
- echo "Installing custom Go version $VERSION ..."
- rm -rf /usr/local/go
- goenv install $VERSION && rm -rf /tmp/*
- goenv global $VERSION
python:
versions:
3.9:
commands:
- echo "Installing Python version 3.9 ..."
- pyenv global $PYTHON_39_VERSION
3.8:
commands:
- echo "Installing Python version 3.8 ..."
- pyenv global $PYTHON_38_VERSION
3.7:
commands:
- echo "Installing Python version 3.7 ..."
- pyenv global $PYTHON_37_VERSION
default:
commands:
- echo "Installing custom Python version $VERSION ..."
- pyenv install $VERSION && rm -rf /tmp/*
- pyenv global $VERSION
php:
versions:
7.4:
commands:
- echo "Installing PHP version 7.4 ..."
- phpenv global $PHP_74_VERSION
7.3:
commands:
- echo "Installing PHP version 7.3 ..."
- phpenv global $PHP_73_VERSION
default:
commands:
- echo "Installing custom PHP version $VERSION ..."
- phpenv install $VERSION && rm -rf /tmp/*
- phpenv global $VERSION
ruby:
versions:
2.6:
commands:
- echo "Installing Ruby version 2.6 ..."
- rbenv global $RUBY_26_VERSION
2.7:
commands:
- echo "Installing Ruby version 2.7 ..."
- rbenv global $RUBY_27_VERSION
default:
commands:
- echo "Installing custom Ruby version $VERSION ..."
- rbenv install $VERSION && rm -rf /tmp/*
- rbenv global $VERSION
nodejs:
versions:
10:
commands:
- echo "Installing Node.js version 10 ..."
- n $NODE_10_VERSION
12:
commands:
- echo "Installing Node.js version 12 ..."
- n $NODE_12_VERSION
default:
commands:
- echo "Installing custom Node.js version $VERSION ..."
- n $VERSION && rm -rf /tmp/*
docker:
versions:
19:
commands:
- echo "Specifying docker version in buildspec is deprecated. Using docker $DOCKER_VERSION"
dotnet:
versions:
3.1:
commands:
- echo "Installing .NET version 3.1 ..."
default:
commands:
- echo "Installing custom .Net version $VERSION ..."
- /usr/local/bin/dotnet-install.sh -v $VERSION && rm -rf /tmp/*
- test -f "global.json" && echo "Using provided global.json" || dotnet new globaljson --sdk-version $VERSION