Skip to content

Commit

Permalink
Merge branch 'master' into feature/save-pod-logs-using-hostpath
Browse files Browse the repository at this point in the history
  • Loading branch information
burak-58 authored Jan 13, 2025
2 parents 3ad1d14 + 151b6df commit 0aa1f29
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
run: |
echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
yum -y install wget which findutils which crontabs unzip
curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4)
curl -L -o ant-media-server-community.zip https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.11.3/ant-media-server-community-2.11.3.zip
bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false
/usr/local/antmedia/antmedia start
sleep 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ runs:
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
yum -y install wget which findutils which crontabs unzip
curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4)
curl -L -o ant-media-server-community.zip https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.11.3/ant-media-server-community-2.11.3.zip
bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false
/usr/local/antmedia/antmedia start
sleep 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ runs:
run: |
echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
yum -y install wget which findutils which crontabs unzip
curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4)
curl -L -o ant-media-server-community.zip https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.11.3/ant-media-server-community-2.11.3.zip
bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false
/usr/local/antmedia/antmedia start
sleep 30
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/centos8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Centos
on: [push]

jobs:
Centos8:
runs-on: ubuntu-24.04
container: centos:8
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/deploy-centos-8
6 changes: 6 additions & 0 deletions .github/workflows/rockylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: RockyLinux
on: [push]

jobs:
RockyLinux8:
runs-on: ubuntu-24.04
container: rockylinux:8
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/deploy-rockylinux-8
RockyLinux9:
runs-on: ubuntu-24.04
container: rockylinux:9
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/uninstall-ams.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Uninstall Ant Media Server
on: [push]

jobs:
test-uninstall:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up test environment
run: |
sudo apt-get update
sudo apt-get install -y curl systemd
- name: Download and install Ant Media Server
run: |
wget https://raw.githubusercontent.com/ant-media/Scripts/refs/heads/master/install_ant-media-server.sh
curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4)
bash ./install_ant-media-server.sh -i ant-media-server-community.zip
- name: Verify AMS Installation
run: |
sleep 30
systemctl is-active antmedia
test -d /usr/local/antmedia
ps -aux |grep antmedia
- name: Run uninstall script
run: |
wget https://raw.githubusercontent.com/ant-media/Ant-Media-Server/refs/heads/master/src/main/server/uninstall.sh
sudo bash ./uninstall.sh <<< "yes"
- name: Verify uninstallation
run: |
# Check if service file is removed
test ! -f /etc/systemd/system/antmedia.service
# Check if installation directory is removed
test ! -d /usr/local/antmedia
# Check if log directory is removed
test ! -d /var/log/antmedia
11 changes: 10 additions & 1 deletion install_ant-media-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ distro () {
exit 1
fi

if [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 9* ]] && [[ $VERSION_ID != 12 ]] && [[ $VERSION_ID != 11 ]]; then
if [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 8* ]] && [[ $VERSION_ID != 9* ]] && [[ $VERSION_ID != 12 ]] && [[ $VERSION_ID != 11 ]]; then
echo $msg
exit 1
fi
Expand Down Expand Up @@ -333,6 +333,15 @@ elif [ "$ID" == "centos" ] || [ "$ID" == "rocky" ] || [ "$ID" == "almalinux" ] |
$SUDO yum -y install unzip zip libva libvdpau
$SUDO unzip -o $ANT_MEDIA_SERVER_ZIP_FILE "ant-media-server/ant-media-server.jar" -d /tmp/
VERSION=$(unzip -p /tmp/ant-media-server/ant-media-server.jar | grep -a "Implementation-Version"|cut -d' ' -f2 | tr -d '\r')
OS_VERSION=$(echo $VERSION_ID | cut -d. -f1)

if [ "$OS_VERSION" == "8" ]; then
if [[ "$(printf '%s\n' "$VERSION" "2.12.0" | sort -V | head -n1)" == "2.12.0" ]]; then
echo -e "${RED}AMS version 2.12.0 and above (including version $VERSION) is not supported on $ID 8 distributions.${NC}"
exit 1
fi
fi

if [ "$(printf '%s\n' "$REQUIRED_VERSION" "$VERSION" | sort -V | head -n1)" != "$REQUIRED_VERSION" ]; then
check_version
$SUDO yum -y install libcrystalhd
Expand Down

0 comments on commit 0aa1f29

Please sign in to comment.