37 lines
1.2 KiB
Groovy
37 lines
1.2 KiB
Groovy
|
|
/*
|
|
* Install a list of packages though the usual apt-get system.
|
|
* This requires that the packages are available from the configured repos
|
|
*/
|
|
def installPackages(ArrayList<String> packageNames, String root_credentials_id) {
|
|
echo "Using credentials: ${root_credentials_id}"
|
|
withCredentials([usernamePassword(credentialsId: root_credentials_id,
|
|
usernameVariable: 'SUDO_USERNAME',
|
|
passwordVariable: 'SUDO_PASSWORD')]) {
|
|
def sudo_S = "echo ${SUDO_PASSWORD} | sudo -S"
|
|
def sudo_Sk = "echo ${SUDO_PASSWORD} | sudo -S -k"
|
|
|
|
sh """
|
|
${sudo_Sk} apt-get -y install ${packageNames.join(' ')}
|
|
"""
|
|
}
|
|
}
|
|
|
|
/*
|
|
* Install all system packages needed by the ESW build
|
|
* for x86 (i.e. not cross-compilation) targets
|
|
*/
|
|
def installX86EswBuildDeps(String root_credentials_id) {
|
|
def packages = [
|
|
"build-essential",
|
|
"lld"
|
|
]
|
|
|
|
// This should at least contain the x86 counterpart to the ARM compiler
|
|
def gccPackages = ["gcc-10", "g++-10"]
|
|
|
|
def allPackages = packages + gccPackages
|
|
installPackages(allPackages, root_credentials_id)
|
|
}
|
|
|
|
return this;
|