From 15fb8789b914127e16dad417bb2aa0cb2d126ebc Mon Sep 17 00:00:00 2001 From: Huyen Nguyen Date: Tue, 30 Jan 2024 17:30:02 +0700 Subject: [PATCH] Update --- Dockerfile | 1 + docker/scripts/setup.sh | 2 +- docker/scripts/setup_environment.sh | 91 +++++++++++++++-------------- 3 files changed, 48 insertions(+), 46 deletions(-) diff --git a/Dockerfile b/Dockerfile index b439b564..4d6ab8be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,6 +64,7 @@ COPY ./docker/scripts/wrap_chrome_binary.sh wrap_chrome_binary.sh COPY ./docker/scripts/upgrade_environment.sh upgrade_environment.sh COPY ./docker/scripts/setup_agent.sh setup_agent.sh COPY ./docker/scripts/setup.sh setup.sh +COPY ./docker/scripts/setup_environment.sh setup_environment.sh COPY ./docker/scripts/agent.sh agent.sh RUN ./setup.sh diff --git a/docker/scripts/setup.sh b/docker/scripts/setup.sh index e4bbe0dc..c9d3c24f 100755 --- a/docker/scripts/setup.sh +++ b/docker/scripts/setup.sh @@ -2,5 +2,5 @@ set -xe -./setup_environment.sh +# ./setup_environment.sh ./setup_agent.sh \ No newline at end of file diff --git a/docker/scripts/setup_environment.sh b/docker/scripts/setup_environment.sh index c4e7cb2d..9bb7b675 100755 --- a/docker/scripts/setup_environment.sh +++ b/docker/scripts/setup_environment.sh @@ -1,54 +1,54 @@ #!/bin/bash -set -xe +# set -xe -apt update +# apt update -echo "Install tools" -apt -y install apt-utils -apt -y install wget -apt -y install unzip -apt -y install curl -apt -y install gosu +# echo "Install tools" +# apt -y install apt-utils +# apt -y install wget +# apt -y install unzip +# apt -y install curl +# apt -y install gosu -echo "Install JRE" -apt -y install default-jre +# echo "Install JRE" +# apt -y install default-jre -echo "Install CircleCI tools" -apt -y install git -apt -y install ssh -apt -y install tar -apt -y install gzip -apt -y install ca-certificates +# echo "Install CircleCI tools" +# apt -y install git +# apt -y install ssh +# apt -y install tar +# apt -y install gzip +# apt -y install ca-certificates -echo "Install Xvfb" -apt -y install xvfb +# echo "Install Xvfb" +# apt -y install xvfb -echo "Install fonts" -apt -y install libfontconfig -apt -y install libfreetype6 -apt -y install xfonts-cyrillic -apt -y install xfonts-scalable -apt -y install fonts-liberation -apt -y install fonts-ipafont-gothic -apt -y install fonts-wqy-zenhei -apt -y install fonts-tlwg-loma-otf -apt -y install ttf-ubuntu-font-family +# echo "Install fonts" +# apt -y install libfontconfig +# apt -y install libfreetype6 +# apt -y install xfonts-cyrillic +# apt -y install xfonts-scalable +# apt -y install fonts-liberation +# apt -y install fonts-ipafont-gothic +# apt -y install fonts-wqy-zenhei +# apt -y install fonts-tlwg-loma-otf +# apt -y install ttf-ubuntu-font-family -echo "Install Mozilla Firefox" -apt -y install firefox -# Install 'pulseaudio' package to support WebRTC audio streams -apt -y install pulseaudio -echo "$(firefox -version)" >> $KATALON_VERSION_FILE +# echo "Install Mozilla Firefox" +# apt -y install firefox +# # Install 'pulseaudio' package to support WebRTC audio streams +# apt -y install pulseaudio +# echo "$(firefox -version)" >> $KATALON_VERSION_FILE -echo "Install Google Chrome" -chrome_package='google-chrome-stable_current_amd64.deb' -wget -O $chrome_package https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -dpkg -i $chrome_package || apt -y -f install -rm $chrome_package -echo "$(google-chrome --version)" >> $KATALON_VERSION_FILE || true +# echo "Install Google Chrome" +# chrome_package='google-chrome-stable_current_amd64.deb' +# wget -O $chrome_package https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb +# dpkg -i $chrome_package || apt -y -f install +# rm $chrome_package +# echo "$(google-chrome --version)" >> $KATALON_VERSION_FILE || true -./wrap_chrome_binary.sh && rm -rfv ./wrap_chrome_binary.sh +# ./wrap_chrome_binary.sh && rm -rfv ./wrap_chrome_binary.sh echo "Install Gradle" gradle_version='7.6.3' @@ -59,7 +59,8 @@ ls unzip $gradle_package ls rm $gradle_package -mv $gradle_unzipped_package $GRADLE_HOME +mv $gradle_unzipped_package /opt/gradle-7 +export GRADLE_HOME=/opt/gradle-7 ls $GRADLE_HOME chmod -R 777 $KATALON_ROOT_DIR @@ -67,7 +68,7 @@ chmod -R 777 $KATALON_SOFTWARE_DIR # clean up -echo "Clean up" -apt clean all -rm -rf /var/lib/apt/lists/* -cat $KATALON_VERSION_FILE +# echo "Clean up" +# apt clean all +# rm -rf /var/lib/apt/lists/* +# cat $KATALON_VERSION_FILE