Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bad Stream health hook #5567

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Update AntMediaApplicationAdapter.java

7ca7860
Select commit
Loading
Failed to load commit list.
Open

Add bad Stream health hook #5567

Update AntMediaApplicationAdapter.java
7ca7860
Select commit
Loading
Failed to load commit list.
Travis CI / Travis CI - Pull Request succeeded Sep 22, 2023 in 35m 16s

Build Passed

The build passed, just like the previous build.

Details

This is a pull request build.

It is running a build against the merge commit, after merging #5567 Add bad Stream health hook.
Any changes that have been made to the master branch before the build ran are also included.

Jobs and Stages

This build only has a single job.
You can use jobs to test against multiple versions of your runtime or dependencies, or to speed up your build.

Build Configuration

Build Option Setting
Language Java
Operating System Linux (Focal)
Node.js Version 14.8.0
JDK Version openjdk11
Build Configuration
{
  "language": "java",
  "os": [
    "linux"
  ],
  "dist": "focal",
  "jdk": [
    "openjdk11"
  ],
  "node_js": [
    "14.8.0"
  ],
  "git": {
    "depth": false
  },
  "addons": {
    "sonarcloud": {
      "organization": "ant-media",
      "token": "$SONAR_TOKEN"
    },
    "apt": {
      "packages": [
        "redis-tools"
      ]
    }
  },
  "services": [
    "redis"
  ],
  "before_install": [
    "openssl aes-256-cbc -K $encrypted_5fef4fa28306_key -iv $encrypted_5fef4fa28306_iv -in codesigning.asc.enc -out codesigning.asc -d",
    "export GPG_TTY=$(tty)",
    "gpg2 --batch --fast-import codesigning.asc",
    "sudo apt purge mongodb* -qq",
    "sudo apt autoremove -qq",
    "sudo rm -rf /var/lib/mongodb",
    "wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -",
    "echo \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list",
    "sudo sed -e 's/^bind.*/bind 127.0.0.1/' /etc/redis/redis.conf > redis.conf",
    "sudo mv redis.conf /etc/redis",
    "sudo service redis-server start",
    "sudo apt-get update -qq",
    "sudo apt-get install mongodb-org ffmpeg wondershaper -y -qq",
    "sudo mongod --dbpath /var/lib/mongodb &>/dev/null &",
    "sudo git clone --depth=1 https://github.com/ant-media/utilities.git /usr/local/onvif",
    "(if [ $(git ls-remote https://github.com/ant-media/ant-media-server-parent.git $TRAVIS_BRANCH  | wc -l) == \"1\" ]; then echo \" $TRAVIS_BRANCH branch found\"; git clone --depth=1 -b $TRAVIS_BRANCH https://github.com/ant-media/ant-media-server-parent.git; else echo \"branch not found\"; git clone --depth=1 https://github.com/ant-media/ant-media-server-parent.git; fi)",
    "cd ant-media-server-parent",
    "mvn clean install -DskipTests -Dmaven.javadoc.skip=true -Dgpg.skip=true --quiet",
    "cd ..",
    "mvn clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -Dgpg.skip=true --quiet",
    "(if [ $(git ls-remote https://github.com/ant-media/StreamApp.git $TRAVIS_BRANCH  | wc -l) == \"1\" ]; then echo \" $TRAVIS_BRANCH branch found\"; git clone --depth=1 -b $TRAVIS_BRANCH https://github.com/ant-media/StreamApp.git; else echo \"branch not found. Checking out master\"; git clone --depth=1 https://github.com/ant-media/StreamApp.git; fi)",
    "cd StreamApp;",
    "mvn clean install -DskipTests -Dmaven.javadoc.skip=true -Dgpg.skip=true -B -V --quiet;",
    "cd ..;",
    "npm install -g @angular/cli@10.0.5",
    "(if [ $(git ls-remote https://github.com/ant-media/ManagementConsole_AngularApp.git $TRAVIS_BRANCH  | wc -l) == \"1\" ]; then echo \" $TRAVIS_BRANCH branch found\"; git clone --depth=1 -b $TRAVIS_BRANCH https://github.com/ant-media/ManagementConsole_AngularApp.git; else echo \"branch not found\"; git clone --depth=1 https://github.com/ant-media/ManagementConsole_AngularApp.git; fi)",
    "cd ManagementConsole_AngularApp",
    "(if [[ -d \"$HOME/.antmedia/cache/node_modules\" ]]; then echo \"Restore node_modules from cache\"; cp -rf \"$HOME/.antmedia/cache/node_modules\" .; fi)",
    "npm install",
    "export NODE_OPTIONS=--openssl-legacy-provider",
    "ng build --prod",
    "cp -a ./dist/. ../src/main/server/webapps/root/",
    "mkdir -p $HOME/.antmedia/cache",
    "rm -rf $HOME/.antmedia/cache/node_modules",
    "mv node_modules $HOME/.antmedia/cache/",
    "cd ..",
    "wget -O ~/.m2/repository/org/bytedeco/ffmpeg/5.1.2-1.5.8/ffmpeg-5.1.2-1.5.8-linux-x86_64.jar https://storage.sbg.cloud.ovh.net/v1/AUTH_8cb28f9bc6ee43f0a3a1825efbb4311e/test-storage/ffmpeg-5.1.2-1.5.8-linux-x86_64.jar",
    "wget -O ~/.m2/repository/org/bytedeco/ffmpeg/5.1.2-1.5.8/ffmpeg-5.1.2-1.5.8-linux-arm64.jar  https://storage.sbg.cloud.ovh.net/v1/AUTH_8cb28f9bc6ee43f0a3a1825efbb4311e/test-storage/ffmpeg-5.1.2-1.5.8-linux-arm64.jar",
    "mvn clean package -U -P assemble -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -DskipTests=true --quiet",
    "(if [ $(git ls-remote https://github.com/ant-media/Scripts.git $TRAVIS_BRANCH  | wc -l) == \"1\" ]; then echo \" $TRAVIS_BRANCH branch found\"; wget https://raw.githubusercontent.com/ant-media/Scripts/$TRAVIS_BRANCH/install_ant-media-server.sh -O target/install_ant-media-server.sh; else echo \"branch not found\"; wget https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh -O target/install_ant-media-server.sh; fi)",
    "chmod 755 target/install_ant-media-server.sh",
    "cd target",
    "./install_ant-media-server.sh -i ant-media-server-community*.zip",
    "cd ..",
    "echo \"Waiting a little to make sure server is started \"",
    "sleep 20",
    "(if [[ -f /usr/local/antmedia/log/antmedia-error.log ]]; then sudo cat /usr/local/antmedia/log/antmedia-error.log; fi)",
    "sudo cat /usr/local/antmedia/log/ant-media-server.log",
    "sudo cp src/test/resources/preset-red5-web.properties  /usr/local/antmedia/webapps/LiveApp/WEB-INF/red5-web.properties",
    "sudo cp src/test/resources/preset-red5-web.db  /usr/local/antmedia/liveapp.db",
    "sudo sed -i 's^server.cpu_limit=.*^server.cpu_limit=100^' /usr/local/antmedia/conf/red5.properties",
    "sudo service antmedia stop",
    "sudo service antmedia start",
    "sleep 10",
    "sudo cat /usr/local/antmedia/log/ant-media-server.log"
  ],
  "install": [
    "mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgpg.skip=true -B -V --quiet"
  ],
  "before_script": [
    "sudo chmod -R 777 /tmp"
  ],
  "script": [
    "export RELEASE_VERSION=\"$(mvn -q -Dexec.executable=\"echo\" -Dexec.args='${project.version}' --non-recursive exec:exec)\"",
    "echo $RELEASE_VERSION",
    "mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package  org.jacoco:jacoco-maven-plugin:report sonar:sonar -Dmaven.javadoc.skip=true --quiet",
    "mvn org.owasp:dependency-check-maven:check  -DfailOnError=false --quiet"
  ],
  "cache": {
    "directories": [
      "$HOME/.m2/repository",
      "$HOME/.sonar/cache",
      "$HOME/.antmedia/cache"
    ]
  },
  "after_failure": [
    "sudo cat /usr/local/antmedia/log/ant-media-server.log",
    "echo \"----------------------------------------------\"",
    "sudo cat /usr/local/antmedia/log/antmedia-error.log",
    "sudo service mongod status",
    "sudo service redis-server status",
    "sudo cat /var/log/mongodb/mongod.log",
    "sudo cat /usr/local/antmedia/hs_err_pid*.log",
    "sudo cat hs_err_pid*.log"
  ],
  "deploy": [
    {
      "provider": "script",
      "script": "mvn deploy -P assemble -DskipTests --settings mvn-settings.xml --quiet",
      "skip_cleanup": true,
      "on": {
        "tags": false,
        "all_branches": true,
        "condition": [
          "$(mvn -q -Dexec.executable=\"echo\" -Dexec.args='${project.version}' --non-recursive exec:exec)  = *\"SNAPSHOT\"*"
        ]
      }
    },
    {
      "provider": "script",
      "script": "mvn deploy -P assemble -DskipTests --settings mvn-settings.xml --quiet",
      "skip_cleanup": true,
      "on": {
        "tags": true,
        "condition": [
          "$TRAVIS_TAG =~ ^ams-v"
        ]
      }
    }
  ]
}