Commit Graph

68 Commits

Author SHA1 Message Date
Mike Salvatore d509ee7216 Build: Pull Python AppImage v3.7.14 2022-09-14 07:22:44 -04:00
Ilija Lazoroski 8355d9e68a Buid: Export CI to get rid of nasty characters 2022-08-17 09:00:44 -04:00
Ilija Lazoroski a96efcdc7d Build: Downgrade pipenv to use 2022.7.4
It seems that every time a new version of pipenv is released, it breaks
our build. See also 01e886f866.
2022-08-17 08:59:51 -04:00
Mike Salvatore cacd064893 Build: Uninstall pipenv and virtualenv after dependencies are installed
This reduces the size of the AppImage by 7.4%
2022-06-09 12:06:42 -04:00
Mike Salvatore 73d20a6a6a Build: Uninstall pipenv from AppImage after dependencies are installed 2022-06-09 11:27:41 -04:00
Mike Salvatore cd1d7b28a8 Build: Use braces to expand array 2022-06-09 11:25:25 -04:00
Mike Salvatore 1b6856b0c2 Build: Double quote variables to prevent splitting 2022-06-09 11:23:05 -04:00
Mike Salvatore f7ad99f592 Build: Handle errors if pushd or popd fail 2022-06-09 11:18:18 -04:00
Mike Salvatore b8a5245c1b Build: Use `pipenv sync --system` instead of requirements.txt
When pipenv dumps the lock file to a requirements.txt, it does not
include the `sys_platform` directive. This causes pip to attempt to
install win32 packages, which fails. By using `pypenv sync --system`
instead, only packages applicable to Linux are installed.

Fixes #1993
2022-06-09 11:15:07 -04:00
Ilija Lazoroski 7356b6cc88 Build: Add cleanup function to build_package 2022-06-03 09:02:32 -04:00
Ilija Lazoroski b8c4ae8e0c Build: Cleanup dangling docker images after build 2022-06-03 12:34:06 +02:00
Mike Salvatore ccc29e448c Build: Keep old conf during apt-get upgrade 2022-05-19 11:30:54 -04:00
Mike Salvatore fc96e3aced Build: Switch order of user_exists() and exit_if_user_doesnt_exist() 2022-05-05 11:03:48 -04:00
Mike Salvatore d5bb94f1a8 Build: Make error message formatting consistent 2022-05-05 11:03:48 -04:00
Mike Salvatore 019bc56a73 Build: Handle empty usernames 2022-05-05 11:03:48 -04:00
Mike Salvatore 0f133d0b35 Build: Improve echo in install-infection-monkey-service.sh 2022-05-05 11:03:48 -04:00
Mike Salvatore 56bdbe5ac6 Build: Rename move_appimage() -> copy_appimage() 2022-05-05 11:03:48 -04:00
Mike Salvatore e1b053f000 Build: Move move_appimage() for improved readability 2022-05-05 11:03:48 -04:00
Mike Salvatore 88eb9dbe81 Build: Extract function install_systemd_unit() 2022-05-05 11:03:48 -04:00
Mike Salvatore a81462e617 Build: Use writable location for temporary systemd unit file
As set, the $SCRIPT_DIR was read-only (since the AppImage's squashfs is
readonly). Use $PWD instead.
2022-05-05 11:03:48 -04:00
Mike Salvatore 27ac518f2e Build: Set umask before writing temporary systemd unit file 2022-05-05 11:03:48 -04:00
Mike Salvatore 02ba8361a9 Build: Extract function exit_if_user_doesnt_exist() 2022-05-05 11:03:48 -04:00
Mike Salvatore 2a18e3e1bf Build: Remove unnecessary assert_parameter_supplied() 2022-05-05 11:03:48 -04:00
Mike Salvatore 7e039f73ff Build: Ensure either --install or --uninstall are specified 2022-05-05 11:03:48 -04:00
Mike Salvatore 6d50814c19 Build: Make --install and --uninstall mutually exclusive 2022-05-05 11:03:48 -04:00
Mike Salvatore ed58ca6950 Build: Rename $uname -> $username in AppImage installation script
"uname" could refer to the `uname` command (short for unix name).
"username" more clearly communicates the variable's purpose.
2022-05-05 11:03:48 -04:00
EliaOnceAgain 0287f58d8d Build: Use $APPIMAGE instead of --path during service installation 2022-05-05 11:02:56 -04:00
EliaOnceAgain 02916a25f3 Build: Check for the 'service' argument in AppRun 2022-05-05 11:02:35 -04:00
EliaOnceAgain 1c702b28ba Build: Include install-infection-monkey-service.sh in the AppImage 2022-05-05 11:02:28 -04:00
EliaOnceAgain 6dfaf5ec74 Deploy: Move deployment_scripts/install-infection-monkey-service.sh to build_script/appimage/ 2022-05-05 11:01:47 -04:00
Mike Salvatore fdf8198e7f Build: Use `pipenv requirements` in appimage build
As of pipenv 2022.04.30, `pipenv lock -r` is deprecated in favor of the
new `pipenv requirements` command.
2022-05-02 08:52:17 -04:00
Ilija Lazoroski 0a145be25d Build: Change BUILD file to include commit hash on dev builds
Issue #1553
2022-04-29 10:52:52 -04:00
Ilija Lazoroski 27d47c05c4 Build: Run `npm run dev` on development build 2022-04-12 17:25:04 +02:00
vakarisz 84fe47a9e5 Deploy: Change node version for linux based builds 2022-04-04 14:39:35 +03:00
Mike Salvatore 3973f26192 Build: Bump Python version for building AppImage to 3.7.13 2022-03-22 19:34:25 -04:00
Mike Salvatore d84e35f637 Build: Remove references to 32-bit agents from Docker and Appimage build 2022-02-24 09:42:40 -05:00
VakarisZ 00819ccf40 Build: remove unused server config options from docker
Options removed match the defaults so there's no reason to keep them
2021-11-26 12:04:46 +02:00
Mike Salvatore cb613393e2 Build: Add warning about building an AppImage on LXD with shiftfs 2021-11-08 21:22:52 -05:00
VakarisZ cebd41b264 Build: change docker container to set MONKEY_DOCKER_CONTAINER env var. This variable is needed because we can't prompt for data dir removal on docker like we do on other deployments
Due to the fact that docker is not running interactively and user might be running on an old data dir if he uses volumes, we need special case for docker
2021-10-25 17:11:31 +03:00
Mike Salvatore c3f5812906 Build: Refactor agent versioning 2021-10-21 12:19:08 -04:00
Ilija Lazoroski d55cbcfbd3 Build: Fix move package to dist dir on appimage 2021-10-21 17:25:00 +02:00
Ilija Lazoroski 6d827ad1af Build: Refactor commit id 2021-10-21 17:12:01 +02:00
Ilija Lazoroski 530ba633d2 Build: Add build commit to appimage build name 2021-10-21 16:52:13 +02:00
Mike Salvatore 6b0a689adb Docker: Fix `git rev-parse` command
Add -C to git command in order
to execute rev-parse outside the repo.
2021-10-21 16:52:13 +02:00
VakarisZ eedf4484bc Deployments: fix the extraction of commit number in docker.sh 2021-10-21 16:52:13 +02:00
VakarisZ 46ef9df1d2 Deployments: change the default monkey_version to ""
If the version is none (default) the commit number will be used which is preferred in dev environment
2021-10-21 16:52:13 +02:00
VakarisZ 25df96da63 Deployments: Rename docker deployment only if a version is not specified
With this change, Jenkins will output docker packages in the following naming conventions:

Develop: InfectionMonkey-docker-$commit_number.tgz

Release: InfectionMonkey-docker-v$version.tgz
2021-10-21 16:52:13 +02:00
VakarisZ 226c72df5f Deployments: Rename appImage deployment only if a specific version is not specified
With this change, Jenkins will output packages in the following naming conventions:

Develop: InfectionMonkey-$commit_number_x86_64.AppImage

Release: InfectionMonkey-v$version.AppImage
2021-10-21 16:52:13 +02:00
VakarisZ 65f7fd0131 Deployments: change the outputs of appimage build and docker build to conform to the naming convention of InfectionMonkey-v*.*
AppImages are built into InfectionMonkey-v1.11.0.AppImage

Docker is build into InfectionMonkey-docker-v1.11.0.tgz
2021-10-21 16:52:13 +02:00
Mike Salvatore 3a907c3cae Build: Link to setup instructions from Docker README.md 2021-10-21 09:22:57 -04:00