dda-devops-build/infrastructure/clj-cljs/image/resources/install.sh

48 lines
1.4 KiB
Bash
Raw Normal View History

#!/bin/bash
2023-12-07 19:38:43 +00:00
set -exo pipefail
function main() {
2023-12-07 19:38:43 +00:00
{
upgradeSystem
mkdir -p /usr/share/man/man1
2023-12-07 19:38:43 +00:00
apt-get -qqy install openjdk-17-jre-headless leiningen curl
# shadow-cljs
2023-12-07 19:38:43 +00:00
npm install -g npm
npm install -g --save-dev shadow-cljs
2021-08-23 14:19:49 +00:00
# download kubeconform & graalvm
2023-12-07 19:38:43 +00:00
kubeconform_version="0.6.4"
curl -SsLo /tmp/kubeconform.tar.gz https://github.com/yannh/kubeconform/releases/download/v${kubeconform_version}/kubeconform-linux-amd64.tar.gz
curl -SsLo /tmp/CHECKSUMS https://github.com/yannh/kubeconform/releases/download/v${kubeconform_version}/CHECKSUMS
# checksum kubeconform
checksum
2021-08-23 14:19:49 +00:00
# install kubeconform
2023-12-07 19:38:43 +00:00
tar -C /usr/local/bin -xf /tmp/kubeconform.tar.gz --exclude=LICENSE
2023-07-20 10:14:25 +00:00
#install pyb
2023-12-07 19:38:43 +00:00
apt-get -qqy install python3 python3-pip git
pip3 install pybuilder 'ddadevops>=4.7.0' deprecation dda-python-terraform boto3 pyyaml inflection --break-system-packages
2023-07-20 10:14:25 +00:00
cleanupDocker
2023-12-07 19:38:43 +00:00
} > /dev/null
}
function checksum() {
checksum_var=$(awk '{print $1}' /tmp/CHECKSUMS|sed -n '2p')
sha256sum_var=$(sha256sum /tmp/kubeconform.tar.gz|awk '{print $1}')
if [ $checksum_var == $sha256sum_var ]; then
echo "Kubeconform checksum verification succesful"
else
echo "Failure in kubeconform checksum verification"
exit 1
fi
}
source /tmp/install_functions_debian.sh
DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes main