-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[157] Update package manager to poetry
- Loading branch information
1 parent
00cbdd1
commit 2d93f3b
Showing
12 changed files
with
1,647 additions
and
1,481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[run] | ||
branch = True | ||
|
||
[report] | ||
show_missing = True | ||
skip_covered = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ LABEL vendor="Binbash Leverage ([email protected])" | |
RUN apk update &&\ | ||
apk add --no-cache bash bash-completion ncurses git curl gcc musl-dev python3 python3-dev py3-pip | ||
|
||
ENV POETRY_VIRTUALENVS_CREATE=false | ||
ENV PATH="${PATH}:/root/.poetry/bin" | ||
|
||
# Install bats from source | ||
RUN git clone https://github.com/bats-core/bats-core.git && ./bats-core/install.sh /usr/local | ||
# Install other bats modules | ||
|
@@ -16,19 +19,16 @@ RUN mkdir /root/.ssh | |
# Needed for git to run propertly | ||
RUN touch /root/.gitconfig | ||
|
||
WORKDIR /leverage | ||
RUN git config --global --add safe.directory /leverage | ||
# Install requirements for running unit tests | ||
COPY ./dev-requirements.txt . | ||
RUN pip install -r dev-requirements.txt | ||
RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/usr/local POETRY_VERSION=1.8.2 python3 - | ||
|
||
RUN git config --global --add safe.directory /workdir | ||
|
||
# Copying all necessary files to /workdir directory | ||
COPY . /workdir | ||
WORKDIR /workdir | ||
|
||
RUN poetry install --with=dev --with=main | ||
|
||
COPY entrypoint.sh / | ||
# Make script to configure and start docker daemon the default entrypoint | ||
RUN echo $'#!/bin/bash \n\ | ||
# Configure docker daemon to listen through socket \n\ | ||
mkdir /etc/docker \n\ | ||
echo \'{"tls": false, "hosts": ["unix:///var/run/docker.sock"]}\' > /etc/docker/daemon.json\n\ | ||
# Start daemon silently \n\ | ||
dockerd > /dev/null 2>&1 & \n\ | ||
exec "$@" \n' >> /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
ENTRYPOINT [ "/entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
# Configure docker daemon to listen through socket | ||
mkdir /etc/docker | ||
echo '{"tls": false, "hosts": ["unix:///var/run/docker.sock"]}' > /etc/docker/daemon.json | ||
# Start daemon silently | ||
dockerd > /dev/null 2>&1 & | ||
exec "$@" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,63 @@ | ||
[tool.poetry] | ||
name = "leverage" | ||
version = "0.0.0" | ||
description = "Binbash Leverage Command-Line tool." | ||
authors = ["BinBash Inc <[email protected]>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
homepage = "https://github.com/binbashar/leverage" | ||
repository = "https://github.com/binbashar/leverage" | ||
documentation = "https://leverage.binbash.co/" | ||
keywords = ["leverage", "binbash"] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Build Tools", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10" | ||
] | ||
packages = [ | ||
{ include = "leverage" }, | ||
{ include = "leverage/modules" }, | ||
{ include = "leverage/containers" } | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.8" | ||
click = "8.0.1" | ||
yaenv = "1.4.1" | ||
"ruamel.yaml" = "0.17.10" | ||
jinja2 = "3.0.1" | ||
docker = "6.1.0" | ||
dockerpty = "0.4.1" | ||
questionary = "1.10.0" | ||
python-hcl2 = "3.0.1" | ||
boto3 = "1.33.2" | ||
configupdater = "3.2" | ||
docutils = "0.17.1" | ||
rich = "10.4.0" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
pylint = "2.8.3" | ||
pytest = "6.2.4" | ||
pytest-cov = "2.12.1" | ||
twine = "3.4.1" | ||
black = "23.3.0" | ||
|
||
|
||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry.scripts] | ||
leverage = "leverage:leverage" | ||
|
||
[tool.black] | ||
line-length = 120 | ||
extend-exclude = """ | ||
simple_build_bad_syntax.py | ||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters