-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add_terraform
- Loading branch information
Showing
47 changed files
with
1,440 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Deploy on Debian 11 | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install Ant Media Server | ||
shell: bash | ||
run: | | ||
apt-get update | ||
apt-get -y install wget findutils unzip curl | ||
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 -s false | ||
/usr/local/antmedia/antmedia start | ||
sleep 40 | ||
if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then | ||
echo "LiveApp started log does not exist. Check the logs above" | ||
exit 1; | ||
fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Deploy on Debian 12 | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install Ant Media Server | ||
shell: bash | ||
run: | | ||
apt-get update | ||
apt-get -y install wget findutils unzip curl | ||
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 -s false | ||
/usr/local/antmedia/antmedia start | ||
sleep 40 | ||
if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then | ||
echo "LiveApp started log does not exist. Check the logs above" | ||
exit 1; | ||
fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Debian | ||
on: [push] | ||
|
||
jobs: | ||
Debian11: | ||
runs-on: ubuntu-24.04 | ||
container: debian:11 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/deploy-debian-11 | ||
Debian12: | ||
runs-on: ubuntu-24.04 | ||
container: debian:12 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/deploy-debian-12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Docker Build and Test | ||
|
||
on: | ||
# [push] | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 */5 * *' | ||
|
||
jobs: | ||
build: | ||
runs-on: self-hosted | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Show current branch | ||
run: echo "Current branch is ${{ github.event.inputs.branch_name }}" | ||
|
||
- name: stop the AMS service | ||
run: sudo systemctl stop antmedia | ||
|
||
- name: Run Docker service | ||
run: sudo systemctl restart docker | ||
|
||
- name: Build Docker image | ||
run: docker build -f docker/Dockerfile_Process --network=host -t antmediaserver --build-arg LicenseKey="${{ secrets.ENTERPRISE_LICENSE }}" . | ||
|
||
- name: Run Docker container | ||
run: docker run --restart=always -d --name antmedia --network=host -it antmediaserver | ||
|
||
- name: Check if SSL is enabled or not | ||
run: | | ||
set -e | ||
if docker exec antmedia curl -f https://${{ secrets.CI_SSL_TEST_DOMAIN }}:5443; then | ||
echo "Endpoint is reachable." | ||
exit 1 | ||
else | ||
echo "Endpoint is not reachable, but continuing workflow." | ||
fi | ||
# - name: Clone branch | ||
# run: | | ||
# 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 | ||
|
||
- name: Download enable_ssl.sh inside container | ||
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 | ||
|
||
# - name: Copy enable_ssl.sh from cloned branch to container | ||
# run: docker cp Ant-Media-Server/src/main/server/enable_ssl.sh antmedia:/usr/local/antmedia/enable_ssl.sh | ||
|
||
- name: Run enable_ssl.sh inside container | ||
run: docker exec antmedia bash /usr/local/antmedia/enable_ssl.sh -d ${{ secrets.CI_SSL_TEST_DOMAIN }} | ||
|
||
- name: Verify container is running | ||
run: | | ||
sleep 20 | ||
docker ps -f name=antmedia | ||
if [ $(docker ps -f name=antmedia --format '{{.Names}}') != "antmedia" ]; then | ||
echo "Container is not running" | ||
exit 1 | ||
fi | ||
- name: Test application | ||
run: | | ||
docker exec antmedia curl -f https://${{ secrets.CI_SSL_TEST_DOMAIN }}:5443 | ||
- name: Stop and remove container | ||
if: ${{ always() }} | ||
run: | | ||
docker stop antmedia | ||
docker rm antmedia | ||
sudo systemctl start antmedia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Install Latest Snapshot to Ubuntu 24.04 | ||
on: [push] | ||
|
||
jobs: | ||
Install-Ubuntu-24-04: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
|
||
- run: wget -O maven-metadata.xml https://oss.sonatype.org/service/local/repositories/snapshots/content/io/antmedia/ant-media-server/maven-metadata.xml | ||
#Get latest snapshot | ||
- run: | | ||
export LATEST_SNAPSHOT=$(grep -oP '(?<=<version>)[^<]+' maven-metadata.xml| tail -1) | ||
echo $LATEST_SNAPSHOT | ||
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"; | ||
- run: ./install_ant-media-server.sh -i ant-media-server-community.zip | ||
- run: sudo service antmedia status | ||
- run: sleep 30 | ||
- run: cat /usr/local/antmedia/log/ant-media-server.log | ||
- run: | | ||
if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then | ||
echo "LiveApp started log does not exist. Check the logs above" | ||
exit 1; | ||
fi; | ||
- run: cat /usr/local/antmedia/log/antmedia-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Install Latest to Ubuntu 24.04 | ||
on: [push] | ||
|
||
jobs: | ||
Install-Ubuntu-24-04: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
#Get latest version | ||
- 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) | ||
- run: ./install_ant-media-server.sh -i ant-media-server-community.zip | ||
- run: sleep 30 | ||
- run: cat /usr/local/antmedia/log/ant-media-server.log | ||
- run: | | ||
if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then | ||
echo "LiveApp started log does not exist. Check the logs above" | ||
exit 1; | ||
fi; | ||
- run: cat /usr/local/antmedia/log/antmedia-error.log | ||
Auto-Install-Community-: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
#Get latest version | ||
- run: ./install_ant-media-server.sh | ||
- run: sleep 30 | ||
- run: cat /usr/local/antmedia/log/ant-media-server.log | ||
- run: | | ||
if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then | ||
echo "LiveApp started log does not exist. Check the logs above" | ||
exit 1; | ||
fi; | ||
- run: cat /usr/local/antmedia/log/antmedia-error.log | ||
Auto-Install-Enterprise-: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
#Get latest version | ||
- run: bash -x ./install_ant-media-server.sh -l"${{ secrets.ENTERPRISE_LICENSE }}" | ||
- run: sleep 30 | ||
- run: cat /usr/local/antmedia/log/ant-media-server.log | ||
- run: | | ||
if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then | ||
echo "LiveApp started log does not exist. Check the logs above" | ||
exit 1; | ||
fi; | ||
- run: cat /usr/local/antmedia/log/antmedia-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Python Samples Script | ||
|
||
on: | ||
schedule: | ||
- cron: '0 */12 * * *' | ||
|
||
jobs: | ||
run-selenium: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
WEBHOOK_URL: ${{ secrets.WEBHOOK }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install selenium | ||
pip install requests | ||
- name: Install FFmpeg | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ffmpeg | ||
- name: Install SRT | ||
run: | | ||
git clone https://github.com/Haivision/srt.git | ||
cd srt | ||
sudo apt-get install tclsh pkg-config cmake libssl-dev build-essential | ||
./configure | ||
make | ||
sudo make install | ||
cd .. | ||
- name: Install Chrome | ||
run: | | ||
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | ||
sudo dpkg -i google-chrome-stable_current_amd64.deb | ||
- name: Install ChromeDriver | ||
run: | | ||
wget https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.69/linux64/chromedriver-linux64.zip | ||
unzip chromedriver-linux64.zip | ||
cd chromedriver-linux64 | ||
sudo mv chromedriver /usr/bin/chromedriver | ||
sudo chown root:root /usr/bin/chromedriver | ||
sudo chmod +x /usr/bin/chromedriver | ||
- name: Run Selenium script | ||
run: | | ||
python Selenium/antmedia-samples.py | ||
- name: Install jq | ||
run: sudo apt-get install -y jq | ||
|
||
- name: Send Slack notification on failure | ||
if: ${{ failure() || cancelled() }} | ||
run: | | ||
SLACK_PAYLOAD=$(jq -n --arg text "<@U01UMD36SQ0> GitHub Workflow failed for ${{ github.repository }}" '{text: $text, icon_emoji: ":x:"}') | ||
curl -X POST -H 'Content-type: application/json' --data "$SLACK_PAYLOAD" ${{ env.WEBHOOK_URL }} |
Oops, something went wrong.