homeserver/devspace.sh
Michael Grote 415e5b71a3
All checks were successful
ci/woodpecker/push/gitleaks Pipeline was successful
ci/woodpecker/pr/gitleaks Pipeline was successful
ci/woodpecker/pr/ansible-lint Pipeline was successful
ci/woodpecker/push/ansible-lint Pipeline was successful
dd
2024-07-29 16:18:47 +02:00

32 lines
855 B
Bash
Executable file

#!/bin/bash
IMAGE="registry.mgrote.net/ansible-devspace:latest"
# Farben
# https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux
RESET='\033[0m'
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
echo -e "${GREEN}Run checks...${RESET}"
# TODO hier noch check output mit Haken dran in grün
if ! [ -f "./vault-pass" ]; then
echo -e "${RED}Vault-Pass File is missing!${RESET}"
exit 1
fi
if ! [ -f "./id_ed25519" ]; then
echo -e "${RED}SSH-Private-Key is missing!${RESET}"
exit 1
fi
if ! [ -f "~/.git-credentials" ]; then
echo -e "${YELLOW}~/.git-credentials not Found!${RESET}"
fi
docker pull ${IMAGE}
docker run -it \
-v "$PWD:/ansible-homeserver" \
-v "$HOME/.git-credentials:/root/.git-credentials" \ #credential reinmountern prufen
-w /ansible-homeserver ${IMAGE}