Skip to content

Commit e76d66d

Browse files
Merge branch 'master' into add_terraform
2 parents 1cd1856 + c71d8f2 commit e76d66d

47 files changed

Lines changed: 1441 additions & 164 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Deploy on Debian 11
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Checkout repository
6+
uses: actions/checkout@v3
7+
- name: Install Ant Media Server
8+
shell: bash
9+
run: |
10+
apt-get update
11+
apt-get -y install wget findutils unzip curl
12+
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)
13+
bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false
14+
/usr/local/antmedia/antmedia start
15+
sleep 40
16+
if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then
17+
echo "LiveApp started log does not exist. Check the logs above"
18+
exit 1;
19+
fi;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Deploy on Debian 12
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Checkout repository
6+
uses: actions/checkout@v3
7+
- name: Install Ant Media Server
8+
shell: bash
9+
run: |
10+
apt-get update
11+
apt-get -y install wget findutils unzip curl
12+
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)
13+
bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false
14+
/usr/local/antmedia/antmedia start
15+
sleep 40
16+
if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then
17+
echo "LiveApp started log does not exist. Check the logs above"
18+
exit 1;
19+
fi;

‎.github/workflows/almalinux.yml‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@ name: AlmaLinux
22
on: [push]
33

44
jobs:
5-
Almalinux8:
6-
runs-on: ubuntu-20.04
7-
container: almalinux:8
8-
steps:
9-
- uses: actions/checkout@v3
10-
- uses: ./.github/actions/deploy-almalinux
115
Almalinux9:
12-
runs-on: ubuntu-20.04
6+
runs-on: ubuntu-24.04
137
container: almalinux:9
148
steps:
159
- uses: actions/checkout@v3

‎.github/workflows/ams-utilizations.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,12 @@ jobs:
2525
- name: Set up MongoDB
2626
run: |
2727
bash ./install_mongodb.sh
28+
mongodb_install_ubuntu_24_04:
29+
runs-on: ubuntu-24.04
30+
31+
steps:
32+
- name: Check out repository code
33+
uses: actions/checkout@v3
34+
- name: Set up MongoDB
35+
run: |
36+
bash ./install_mongodb.sh

‎.github/workflows/ant-media-server-docker-multi-platform.yml‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on: [push]
55
jobs:
66
ams_ubuntu_docker_test:
77
runs-on: ubuntu-latest
8+
env:
9+
BRANCH_NAME: ${{ github.ref_name }}
810
steps:
911
- name: Checkout code
1012
uses: actions/checkout@v3
@@ -13,10 +15,10 @@ jobs:
1315
run: 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)
1416

1517
- name: Download Dockerfile
16-
run: wget --quiet https://raw.githubusercontent.com/ant-media/Scripts/master/docker/Dockerfile_Process -O Dockerfile
18+
run: wget --quiet https://raw.githubusercontent.com/ant-media/Scripts/$BRANCH_NAME/docker/Dockerfile_Process -O Dockerfile
1719

1820
- name: Build Docker image
19-
run: docker build --network=host -t antmediaserver:latest --build-arg AntMediaServer=ant-media-server-community.zip .
21+
run: docker build --network=host -t antmediaserver:latest --build-arg AntMediaServer=ant-media-server-community.zip --build-arg BranchName=$BRANCH_NAME .
2022

2123
- name: Run the image
2224
run: docker run -d -p 5080:5080 --name antmediaserver antmediaserver
@@ -43,6 +45,8 @@ jobs:
4345

4446
ams_rockylinux_docker_test:
4547
runs-on: ubuntu-latest
48+
env:
49+
BRANCH_NAME: ${{ github.ref_name }}
4650
steps:
4751
- name: Checkout code
4852
uses: actions/checkout@v3
@@ -51,10 +55,14 @@ jobs:
5155
run: 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)
5256

5357
- name: Download Dockerfile
54-
run: wget --quiet https://raw.githubusercontent.com/ant-media/Scripts/master/docker/Dockerfile_RockyLinux -O Dockerfile
58+
run: |
59+
echo "Building Docker image with branch: $BRANCH_NAME"
60+
wget --quiet https://raw.githubusercontent.com/ant-media/Scripts/$BRANCH_NAME/docker/Dockerfile_RockyLinux -O Dockerfile
5561
5662
- name: Build Docker image
57-
run: docker build --network=host -t antmediaserver:latest --build-arg AntMediaServer=ant-media-server-community.zip .
63+
run: |
64+
echo "Building Docker image with branch: $BRANCH_NAME"
65+
docker build --network=host -t antmediaserver:latest --build-arg AntMediaServer=ant-media-server-community.zip --build-arg BranchName=$BRANCH_NAME .
5866
5967
- name: Run the image
6068
run: docker run -d -p 5080:5080 --name antmediaserver antmediaserver

‎.github/workflows/centos.yml‎

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎.github/workflows/debian.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Debian
2+
on: [push]
3+
4+
jobs:
5+
Debian11:
6+
runs-on: ubuntu-24.04
7+
container: debian:11
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: ./.github/actions/deploy-debian-11
11+
Debian12:
12+
runs-on: ubuntu-24.04
13+
container: debian:12
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: ./.github/actions/deploy-debian-12
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Docker Build and Test
2+
3+
on:
4+
# [push]
5+
workflow_dispatch:
6+
schedule:
7+
- cron: '0 0 */5 * *'
8+
9+
jobs:
10+
build:
11+
runs-on: self-hosted
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v2
16+
17+
- name: Show current branch
18+
run: echo "Current branch is ${{ github.event.inputs.branch_name }}"
19+
20+
- name: stop the AMS service
21+
run: sudo systemctl stop antmedia
22+
23+
- name: Run Docker service
24+
run: sudo systemctl restart docker
25+
26+
- name: Build Docker image
27+
run: docker build -f docker/Dockerfile_Process --network=host -t antmediaserver --build-arg LicenseKey="${{ secrets.ENTERPRISE_LICENSE }}" .
28+
29+
- name: Run Docker container
30+
run: docker run --restart=always -d --name antmedia --network=host -it antmediaserver
31+
32+
- name: Check if SSL is enabled or not
33+
run: |
34+
set -e
35+
if docker exec antmedia curl -f https://${{ secrets.CI_SSL_TEST_DOMAIN }}:5443; then
36+
echo "Endpoint is reachable."
37+
exit 1
38+
else
39+
echo "Endpoint is not reachable, but continuing workflow."
40+
fi
41+
42+
# - name: Clone branch
43+
# run: |
44+
# git clone --depth=1 -b ${{ github.event.inputs.branch_name }} https://github.com/ant-media/Ant-Media-Server.git || git clone --depth=1 https://github.com/ant-media/Ant-Media-Server.git
45+
46+
- name: Download enable_ssl.sh inside container
47+
run: docker exec antmedia wget -O /usr/local/antmedia/enable_ssl.sh https://raw.githubusercontent.com/ant-media/Ant-Media-Server/master/src/main/server/enable_ssl.sh
48+
49+
# - name: Copy enable_ssl.sh from cloned branch to container
50+
# run: docker cp Ant-Media-Server/src/main/server/enable_ssl.sh antmedia:/usr/local/antmedia/enable_ssl.sh
51+
52+
- name: Run enable_ssl.sh inside container
53+
run: docker exec antmedia bash /usr/local/antmedia/enable_ssl.sh -d ${{ secrets.CI_SSL_TEST_DOMAIN }}
54+
55+
- name: Verify container is running
56+
run: |
57+
sleep 20
58+
docker ps -f name=antmedia
59+
if [ $(docker ps -f name=antmedia --format '{{.Names}}') != "antmedia" ]; then
60+
echo "Container is not running"
61+
exit 1
62+
fi
63+
64+
- name: Test application
65+
run: |
66+
docker exec antmedia curl -f https://${{ secrets.CI_SSL_TEST_DOMAIN }}:5443
67+
- name: Stop and remove container
68+
if: ${{ always() }}
69+
run: |
70+
docker stop antmedia
71+
docker rm antmedia
72+
sudo systemctl start antmedia

‎.github/workflows/install-latest-snapshot-to-ubuntu-22-04.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- run: wget -O maven-metadata.xml https://oss.sonatype.org/service/local/repositories/snapshots/content/io/antmedia/ant-media-server/maven-metadata.xml
1313
#Get latest snapshot
1414
- run: |
15-
export LATEST_SNAPSHOT=$(cat maven-metadata.xml | grep "<version>" | tail -n 1 | xargs | cut -c 10-23)
15+
export LATEST_SNAPSHOT=$(grep -oP '(?<=<version>)[^<]+' maven-metadata.xml| tail -1)
1616
echo $LATEST_SNAPSHOT
1717
wget -O ant-media-server-community.zip "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.antmedia&a=ant-media-server&v=${LATEST_SNAPSHOT}&c=community&e=zip";
1818
- run: ./install_ant-media-server.sh -i ant-media-server-community.zip
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Install Latest Snapshot to Ubuntu 24.04
2+
on: [push]
3+
4+
jobs:
5+
Install-Ubuntu-24-04:
6+
runs-on: ubuntu-24.04
7+
steps:
8+
- name: Check out repository code
9+
uses: actions/checkout@v3
10+
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
11+
12+
- run: wget -O maven-metadata.xml https://oss.sonatype.org/service/local/repositories/snapshots/content/io/antmedia/ant-media-server/maven-metadata.xml
13+
#Get latest snapshot
14+
- run: |
15+
export LATEST_SNAPSHOT=$(grep -oP '(?<=<version>)[^<]+' maven-metadata.xml| tail -1)
16+
echo $LATEST_SNAPSHOT
17+
wget -O ant-media-server-community.zip "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.antmedia&a=ant-media-server&v=${LATEST_SNAPSHOT}&c=community&e=zip";
18+
- run: ./install_ant-media-server.sh -i ant-media-server-community.zip
19+
- run: sudo service antmedia status
20+
- run: sleep 30
21+
- run: cat /usr/local/antmedia/log/ant-media-server.log
22+
- run: |
23+
if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then
24+
echo "LiveApp started log does not exist. Check the logs above"
25+
exit 1;
26+
fi;
27+
- run: cat /usr/local/antmedia/log/antmedia-error.log

0 commit comments

Comments
 (0)