dockerised tests
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
curl
|
||||
make
|
||||
net-tools
|
||||
openssh-client
|
||||
openssh-server
|
||||
screenfetch
|
||||
software-properties-common
|
||||
|
||||
@@ -4,15 +4,16 @@
|
||||
#
|
||||
# Install list of packages in ./00-apt-pkglist
|
||||
#
|
||||
readonly package_list_file="00-apt-pkglist"
|
||||
|
||||
# apt update and upgrade non-interactively
|
||||
# apt update, upgrade if not fast
|
||||
update
|
||||
upgrade
|
||||
if [ -z "$FAST_MODE" ]; then
|
||||
upgrade
|
||||
fi
|
||||
|
||||
# Package installs
|
||||
readonly package_list=$(cat $install_dir/$package_list_file) # Don't escape list
|
||||
install $package_list
|
||||
readonly package_list_file="$install_dir/00-apt-pkglist"
|
||||
install_file $package_list_file
|
||||
|
||||
# Log version
|
||||
cat /etc/os-release
|
||||
cat /etc/os-release
|
||||
|
||||
11
install/01-bash.sh
Normal file
11
install/01-bash.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# After running this script:
|
||||
# 1. bash dotfiles are symlinked
|
||||
#
|
||||
|
||||
# 1. bash dotfiles are symlinked
|
||||
readonly bash_source="$dotfiles_dir/bash"
|
||||
readonly bash_target="$HOME"
|
||||
link_folder "$bash_source" "$bash_target"
|
||||
printf "bash dotfiles are linked\n"
|
||||
@@ -18,6 +18,11 @@ if not_installed "fish"; then
|
||||
# Install fish
|
||||
install fish
|
||||
|
||||
# Install fisher
|
||||
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
|
||||
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
|
||||
fish -c fisher
|
||||
|
||||
fi
|
||||
printf "fish is installed\n"
|
||||
fish --version
|
||||
@@ -15,14 +15,20 @@ if not_installed "pyenv"; then
|
||||
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
|
||||
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
|
||||
|
||||
# Add to install path
|
||||
add_path "$HOME/.pyenv/bin"
|
||||
|
||||
# Install pyenv
|
||||
# see https://github.com/pyenv/pyenv-installer
|
||||
run "https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer" bash
|
||||
run "https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer" \
|
||||
"bash"
|
||||
refresh
|
||||
|
||||
# Add to install path and refresh
|
||||
export PATH="$HOME/.pyenv/bin:$PATH"
|
||||
hash -r
|
||||
eval "$(pyenv init -)"
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
|
||||
fi
|
||||
printf "pyenv is installed\n"
|
||||
printf "pyenv is installed, upgrading...\n"
|
||||
readonly pyenv_root=$(pyenv root)
|
||||
git --git-dir="$pyenv_root" pull
|
||||
pyenv --version
|
||||
20
install/11-python.sh
Normal file
20
install/11-python.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# After running this script:
|
||||
# 1. python3 and pip3 are installed
|
||||
#
|
||||
|
||||
# 1. python3 and pip3 are installed
|
||||
if not_installed "pip3"; then
|
||||
|
||||
printf "Installing python3 and pip3...\n"
|
||||
|
||||
pyenv install 3.7.0
|
||||
pyenv global 3.7.0
|
||||
pyenv local 3.7.0
|
||||
|
||||
fi
|
||||
printf "python3 and pip3 are installed, upgrading...\n"
|
||||
pip3 install --upgrade pip
|
||||
python3 --version
|
||||
pip3 --version
|
||||
@@ -10,7 +10,9 @@ if not_installed "poetry"; then
|
||||
printf "Installing poetry...\n"
|
||||
|
||||
# Install poetry
|
||||
run "https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py" "python"
|
||||
pip3 install --user poetry
|
||||
|
||||
fi
|
||||
printf "poetry is installed\n"
|
||||
printf "poetry is installed, upgrading...\n"
|
||||
pip3 install --upgrade poetry
|
||||
poetry --version
|
||||
@@ -27,6 +27,10 @@ if not_installed "docker"; then
|
||||
# Install
|
||||
install docker-ce
|
||||
|
||||
# Chown
|
||||
sudo chown "$USER":"$USER" "$HOME/.docker" -R
|
||||
sudo chmod g+rwx "$HOME/.docker" -R
|
||||
|
||||
fi
|
||||
printf "docker is installed\n"
|
||||
docker --version
|
||||
@@ -37,12 +41,12 @@ if not_installed "docker-compose"; then
|
||||
printf "Installing docker-compose...\n"
|
||||
|
||||
# Docker-compose
|
||||
readonly docker_compose_url="https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m)"
|
||||
sudo curl -L "$docker_compose_url" -o /usr/local/bin/docker-compose
|
||||
sudo chmod +x /usr/local/bin/docker-compose
|
||||
pip3 install --user docker-compose
|
||||
|
||||
|
||||
fi
|
||||
printf "docker-compose is installed\n"
|
||||
printf "docker-compose is installed, upgrading\n"
|
||||
pip3 install --upgrade docker-compose
|
||||
docker-compose --version
|
||||
|
||||
# 3. docker group exists
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# After running this script:
|
||||
# 1. python is installed
|
||||
#
|
||||
|
||||
# 1. python is installed
|
||||
if not_installed "python"; then
|
||||
|
||||
printf "Installing python...\n"
|
||||
|
||||
pyenv install -s 3.7.0
|
||||
pyenv global 3.7.0
|
||||
|
||||
fi
|
||||
printf "python is installed\n"
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Clean up
|
||||
sudo apt-get -qqy autoremove
|
||||
sudo apt-get -qqy autoclean
|
||||
sudo apt-get -y autoremove
|
||||
sudo apt-get -y autoclean
|
||||
|
||||
Reference in New Issue
Block a user