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
This commit is contained in:
VakarisZ 2021-10-18 16:06:04 +03:00 committed by Ilija Lazoroski
parent 3a907c3cae
commit 65f7fd0131
3 changed files with 12 additions and 10 deletions

View File

@ -119,7 +119,8 @@ build_package() {
--deploy-deps-only="$MONGO_PATH/bin/mongod"\
--output appimage
move_package_to_dist_dir $dist_dir
dst_name="InfectionMonkey-v$version.AppImage"
move_package_to_dist_dir $dist_dir $dst_name
popd
}
@ -135,5 +136,5 @@ set_version() {
}
move_package_to_dist_dir() {
mv Infection_Monkey*.AppImage "$1/"
mv Infection_Monkey*.AppImage "$1/$2"
}

View File

@ -8,5 +8,5 @@ APPIMAGE_DIR="$(realpath $(dirname $BASH_SOURCE[0]))"
rm -rf "$HOME/git/monkey"
rm -rf "$HOME/.monkey_island"
rm -rf "$APPIMAGE_DIR/squashfs-root"
rm "$APPIMAGE_DIR"/Infection_Monkey*x86_64.AppImage
rm "$APPIMAGE_DIR/../dist/Infection_Monkey*x86_64.AppImage"
rm "$APPIMAGE_DIR"/Infection_Monkey*.AppImage
rm "$APPIMAGE_DIR/../dist/InfectionMonkey*.AppImage"

View File

@ -1,5 +1,4 @@
DOCKER_DIR="$(realpath $(dirname $BASH_SOURCE[0]))"
OUTPUT_NAME_TGZ="$DOCKER_DIR/infection_monkey_docker_$(date +%Y%m%d_%H%M%S).tgz"
source "$DOCKER_DIR/../common.sh"
@ -41,12 +40,14 @@ build_package() {
pushd ./docker
docker_image_name="guardicore/monkey-island:$version"
tar_name="$DOCKER_DIR/dk.monkeyisland.$version.tar"
tar_name="$DOCKER_DIR/InfectionMonkey-docker-v$version.tar"
build_docker_image_tar "$docker_image_name" "$tar_name"
build_docker_image_tgz "$tar_name" "$version"
move_package_to_dist_dir $dist_dir
tgz_name="$DOCKER_DIR/InfectionMonkey-docker-v$version.tgz"
build_docker_image_tgz "$tar_name" "$tgz_name"
move_package_to_dist_dir $tgz_name $dist_dir
popd
}
@ -60,9 +61,9 @@ build_docker_image_tgz() {
mkdir tgz
mv "$1" ./tgz
cp ./DOCKER_README.md ./tgz/README.md
tar -C ./tgz -cvf "$OUTPUT_NAME_TGZ" --gzip .
tar -C ./tgz -cvf "$2" --gzip .
}
move_package_to_dist_dir() {
mv $OUTPUT_NAME_TGZ "$1/"
mv "$1" "$2/"
}