Closed Hackndo closed 2 years ago
Hi @Hackndo : check this out, this might be (one of) the best way to do it ;) https://medium.com/@systemglitch/continuous-integration-with-jenkins-and-github-release-814904e20776)](https://medium.com/@systemglitch/continuous-integration-with-jenkins-and-github-release-814904e20776
Hello @t-leclercq, thanks for your answer. This is a good start, but from what I understand, if I want to automatically compile linux and windows binaries whenever I push a new release, then I need Jenkins to pull some docker container and run some scripts inside these container (pyinstaller stuff).
Seems to be a lot of work, maybe I'll dive into this later. I tried today for an hour or two, but my Jenkins is already in a docker container, so things are getting nasty! :D
github action ?
@mpgn Yes I'd like to use this, but same as for jenkins, I didn't find a way to automatically build windows and linux executables.
did you try shiv ?
I tried on Linux (https://medium.com/@stevenluda/creating-python-app-using-shiv-df9e00f94675)
python setup.py sdist bdist_wheel
shiv --site-packages dist --compressed -o lsassy.pyz -e lsassy.console:main
But what I get is:
./lsassy.pyz
Traceback (most recent call last):
File "/home/pixis/Tools/Windows/lsassy/./lsassy.pyz/_bootstrap/__init__.py", line 76, in import_string
ModuleNotFoundError: No module named 'lsassy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pixis/Tools/Windows/lsassy/./lsassy.pyz/_bootstrap/__init__.py", line 76, in import_string
ModuleNotFoundError: No module named 'lsassy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pixis/.pyenv/versions/3.9.1/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/pixis/.pyenv/versions/3.9.1/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/pixis/Tools/Windows/lsassy/./lsassy.pyz/__main__.py", line 3, in <module>
File "/home/pixis/Tools/Windows/lsassy/./lsassy.pyz/_bootstrap/__init__.py", line 247, in bootstrap
File "/home/pixis/Tools/Windows/lsassy/./lsassy.pyz/_bootstrap/__init__.py", line 81, in import_string
File "/home/pixis/Tools/Windows/lsassy/./lsassy.pyz/_bootstrap/__init__.py", line 81, in import_string
File "/home/pixis/Tools/Windows/lsassy/./lsassy.pyz/_bootstrap/__init__.py", line 59, in import_string
File "/home/pixis/.pyenv/versions/3.9.1/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'lsassy'
I really should dive into building packages and stuff someday. I remember I spent hours figuring out how to make it work using pyinstaller. :D
This is what I did for CME, it should be the same for lsassy:
script: https://github.com/byt3bl33d3r/CrackMapExec/blob/master/build_collector.py github action: https://github.com/byt3bl33d3r/CrackMapExec/blob/master/.github/workflows/crackmapexec.yml
I can't find a good way to automatically generate builds when I release a new version. If someone knows how to do this, help would be really appreciated 🤗