1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

remove legacy tooling

This commit is contained in:
thatmattlove
2024-03-17 16:02:58 -04:00
parent d706ff1959
commit 6025023c5d
6 changed files with 0 additions and 177 deletions

View File

@@ -1,41 +0,0 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.11.2
hooks:
- id: isort
args: ['--profile', 'black', '--filter-files', '--check']
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.261
hooks:
- id: ruff
# Respect `exclude` and `extend-exclude` settings.
- repo: local
hooks:
- id: typescript
name: TypeScript
files: 'hyperglass/ui/*'
exclude: 'hyperglass/ui/node_modules|hyperglass/ui/.next'
stages:
- commit
entry: ./.tests/pre-commit-frontend.sh --typescript
language: script
- repo: local
hooks:
- id: eslint
name: ESLint
files: 'hyperglass/ui/*'
exclude: 'hyperglass/ui/node_modules|hyperglass/ui/.next'
stages:
- commit
entry: ./.tests/pre-commit-frontend.sh --eslint
language: script
- repo: local
hooks:
- id: prettier
name: Prettier
files: 'hyperglass/ui/*'
exclude: 'hyperglass/ui/node_modules|hyperglass/ui/.next'
stages:
- commit
entry: ./.tests/pre-commit-frontend.sh --prettier
language: script

View File

@@ -1,52 +0,0 @@
#!/usr/bin/env bash
echo "[INFO] Starting Redis..."
redis-server &
cd /tmp/hyperglass
echo "[INFO] Starting setup..."
poetry run hyperglass setup -d
echo "[SUCCESS] Setup completed."
sleep 2
echo "listen_address: 127.0.0.1" >> /root/hyperglass/hyperglass.yaml
echo "[INFO] Starting UI build."
poetry run hyperglass build-ui
if [[ ! $? == 0 ]]; then
echo "[ERROR] Failed to start hyperglass."
exit 1
else
echo "[SUCCESS] UI build completed."
fi
echo "[INFO] Starting hyperglass..."
poetry run hyperglass start &> /var/log/hyperglassci.log &
sleep 180
if [[ ! $? == 0 ]]; then
echo "[ERROR] Failed to start hyperglass."
exit 1
else
echo "[SUCCESS] Started hyperglass."
fi
echo "[INFO] Running HTTP test..."
STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:8001)
echo "[INFO] Status code: $STATUS"
if [[ ! $? == 0 ]]; then
echo "[ERROR] HTTP test failed."
exit 1
elif [[ ! "$STATUS" == "200" ]]; then
echo "[ERROR] HTTP test failed. Startup log:"
cat /var/log/hyperglassci.log
exit 1
fi
echo "[SUCCESS] Tests ran successfully."
exit 0

View File

@@ -1,31 +0,0 @@
FROM ubuntu:bionic as base
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
WORKDIR /tmp
RUN apt-get update \
&& apt-get install -y git curl net-tools \
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y python3 python3-pip python3-venv redis-server nodejs yarn \
# && curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 \
#
# Pinning Poetry installer to this specific version. As of 2020 07 24, the script from master
# fails to install due to Python 2's executable matching first. See #2106
#
&& curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/e70ee3112ab06374dfef4ab84e6dded2382cc7dd/get-poetry.py | python3 \
&& python3 --version \
&& echo "NodeJS $(node --version)" \
&& echo "Yarn $(yarn --version)"
COPY ./ /tmp/hyperglass
ENV PATH=$PATH:/root/.poetry/bin
FROM base as install
WORKDIR /tmp/hyperglass
RUN poetry install --no-ansi
FROM install as setup
WORKDIR /tmp/hyperglass
COPY .tests/app/setup.sh /tmp/setup.sh
RUN ls -lsah /tmp

View File

@@ -1,5 +0,0 @@
FROM ubuntu:bionic as base
WORKDIR /tmp
COPY .tests/install/ubuntu/setup.sh /tmp/init.sh
COPY ./install.sh /tmp/install.sh
RUN bash /tmp/init.sh

View File

@@ -1,17 +0,0 @@
#!/usr/bin/env bash
echo "[INFO] Disabling multiverse repos..."
sed -i -e '/multiverse/s/^#*/#\ /g' /etc/apt/sources.list
cat /etc/apt/sources.list
echo "[INFO] Updating package repos..."
apt-get update &> /dev/null
echo "[INFO] Installing apt-utils..."
apt-get install -y apt-utils > /dev/null
echo "[INFO] Installing base dependencies..."
apt-get install -y curl git gnupg dialog build-essential > /dev/null
echo '[SUCCESS] Completed build'
exit 0

View File

@@ -1,31 +0,0 @@
#!/usr/bin/env bash
UI_DIR="$(pwd)/hyperglass/ui"
check_typescript() {
yarn --cwd $UI_DIR typecheck
}
check_eslint() {
yarn --cwd $UI_DIR lint
}
check_prettier() {
yarn --cwd $UI_DIR prettier -c .
}
for arg in "$@"; do
if [ "$arg" == "--typescript" ]; then
check_typescript
exit $?
elif [ "$arg" == "--eslint" ]; then
check_eslint
exit $?
elif [ "$arg" == "--prettier" ]; then
check_prettier
exit $?
else
echo "Arguments --typescript, --eslint, or --prettier required."
exit 1
fi
done