Skip to content

Commit

Permalink
CO-3006: Update setup scripts to remove webdrivermanager.jar (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
anqnguyen96Katalon committed Jun 6, 2024
1 parent 7d54072 commit e0e53b7
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Dockerfile.harden
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ ARG KATALON_STUDIO_VERSION
# RUN mkdir -p $KATALON_KATALON_SCRIPT_DIR
WORKDIR $KATALON_KATALON_SCRIPT_DIR

COPY ./src/scripts/setup.sh setup.sh
RUN chmod a+x setup.sh
COPY ./src/scripts/setup-harden.sh setup-harden.sh
RUN chmod a+x setup-harden.sh

# Main setup
RUN $KATALON_KATALON_SCRIPT_DIR/setup.sh
# Main setup-harden
RUN $KATALON_KATALON_SCRIPT_DIR/setup-harden.sh

# Set locale
ENV LANG C.UTF-8
Expand Down
37 changes: 37 additions & 0 deletions src/scripts/setup-harden.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

set -xe

# copy scripts
mkdir -p $KATALON_KATALON_ROOT_DIR
cd $KATALON_KATALON_ROOT_DIR

echo "Install Katalon"
katalon_version=$(cut -d '-' -f 1 <<< "$KATALON_STUDIO_VERSION")
katalon_directory="$version"
katalon_package="Katalon_Studio_Engine_Linux_64-$katalon_version.tar.gz"
katalon_unzipped_directory="Katalon_Studio_Engine_Linux_64-$katalon_version"
# general link
wget -O $katalon_package https://download.katalon.com/$KATALON_STUDIO_VERSION/$katalon_package
# beta link
# wget -O $katalon_package https://download.katalon.com/release-beta/$katalon_version/Katalon_Studio_Engine_Linux_64-$katalon_version.tar.gz
ls
tar -xvzf $katalon_package -C $KATALON_KATALON_INSTALL_DIR_PARENT
ls

# Remove webdrivermanager.jar
rm $KATALON_KATALON_INSTALL_DIR_PARENT/$katalon_unzipped_directory/configuration/resources/tools/webdriver/webdrivermanager-5.8.0-fat.jar

rm $katalon_package
mv $KATALON_KATALON_INSTALL_DIR_PARENT/$katalon_unzipped_directory $KATALON_KATALON_INSTALL_DIR
chmod u+x $KATALON_KATALON_INSTALL_DIR/katalonc
chmod -R u+x $KATALON_KATALON_INSTALL_DIR/configuration/resources/drivers
echo "Katalon Studio $version" >> $KATALON_VERSION_FILE

chmod -R 777 $KATALON_ROOT_DIR
chmod -R 777 $KATALON_KATALON_INSTALL_DIR

# clean up
apt clean all
rm -rf /var/lib/apt/lists/*
cat $KATALON_VERSION_FILE

0 comments on commit e0e53b7

Please sign in to comment.