Skip to content

Commit 8f68961

Browse files
quidlphattcu
andauthored
Release (#280)
* Add script auto upgrade microsoft edge version * Add script auto upgrade firefox version --------- Co-authored-by: Phat Cu <[email protected]>
2 parents 96d65b6 + cc38390 commit 8f68961

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ RUN ./docker/scripts/build_agent.sh
1111

1212
# Build docker image
1313
# Install and inherit java version 17 from katalonstudio/katalon:9.2.0
14-
FROM katalonstudio/katalon:9.7.2
14+
FROM katalonstudio/katalon:9.7.5
1515

1616
# Install java version 8
1717
RUN apt-get update && \
@@ -68,6 +68,7 @@ COPY --from=build /katalon/bin/cli-linux-x64 *.sh ./
6868
# Copy script files and setup
6969
WORKDIR $KATALON_SCRIPT_DIR
7070
COPY ./docker/scripts/wrap_chrome_binary.sh wrap_chrome_binary.sh
71+
COPY ./docker/scripts/wrap_edge_chromium_binary.sh wrap_edge_chromium_binary.sh
7172
COPY ./docker/scripts/setup_environment.sh setup_environment.sh
7273
COPY ./docker/scripts/upgrade_environment.sh upgrade_environment.sh
7374
COPY ./docker/scripts/setup_agent.sh setup_agent.sh

docker/scripts/upgrade_environment.sh

+23
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,33 @@
22

33
set -xe
44

5+
echo "Upgrade Mozilla Firefox"
6+
install -d -m 0755 /etc/apt/keyrings
7+
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
8+
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null
9+
echo '
10+
Package: *
11+
Pin: origin packages.mozilla.org
12+
Pin-Priority: 1000
13+
' | tee /etc/apt/preferences.d/mozilla
14+
apt-get update
15+
apt-get install firefox -y
16+
# Install 'pulseaudio' package to support WebRTC audio streams
17+
apt -y install pulseaudio
18+
echo "$(firefox -version)" >> $KATALON_VERSION_FILE
19+
520
echo "Upgrade Google Chrome"
621
chrome_package='google-chrome-stable_current_amd64.deb'
722
wget -O $chrome_package https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
823
dpkg -i $chrome_package || apt -y -f install
924
rm $chrome_package
1025
./wrap_chrome_binary.sh
1126
echo "$(google-chrome --version)" >> $KATALON_VERSION_FILE || true
27+
28+
echo "Upgrade Edge Chromium"
29+
microsoft_edge_package='microsoft-edge-stable_current_amd64.deb'
30+
wget -O $microsoft_edge_package https://go.microsoft.com/fwlink?linkid=2149051
31+
dpkg -i $microsoft_edge_package || apt -y -f install
32+
rm $microsoft_edge_package
33+
./wrap_edge_chromium_binary.sh
34+
echo "$(microsoft-edge --version)" >> $KATALON_VERSION_FILE || true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -xe
4+
5+
echo "Wrap Edge Chromium binary"
6+
7+
WRAPPER_PATH=$(readlink -f /usr/bin/microsoft-edge)
8+
BASE_PATH="$WRAPPER_PATH-base"
9+
mv "$WRAPPER_PATH" "$BASE_PATH"
10+
11+
cat > "$WRAPPER_PATH" <<_EOF
12+
#!/bin/bash
13+
# Note: exec -a below is a bashism.
14+
exec -a "\$0" "$BASE_PATH" --no-sandbox "\$@"
15+
_EOF
16+
chmod +x "$WRAPPER_PATH"

0 commit comments

Comments
 (0)