-
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 pull request #274 from ant-media/check_marketplace_jwt_token
Add test for marketplace product check with jwt token
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 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,41 @@ | ||
name: Marketplace SSL Test | ||
|
||
#run tests on schedule because we don't want to generate a subdomain everytime | ||
on: | ||
schedule: | ||
- cron: '0 0 * * 1' | ||
|
||
jobs: | ||
run_build: | ||
name: Marketplace SSL Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run enable_ssl.sh for marketplace | ||
uses: appleboy/ssh-action@master | ||
with: | ||
#OVH_REMOTE_HOST has marketplace version deployed | ||
host: ${{ secrets.OVH_REMOTE_HOST }} | ||
username: ${{ secrets.OVH_REMOTE_USERNAME }} | ||
key: ${{ secrets.OVH_SSH_PRIVATE_KEY }} | ||
port: ${{ secrets.OVH_REMOTE_PORT }} | ||
# If the version is not marketplace, following enable_ssl.sh script fails | ||
script: | | ||
SECRET_KEY=$(openssl rand -base64 32 | head -c 32) | ||
sudo sed -i "/^server.jwtServerControlEnabled=/s|.*|server.jwtServerControlEnabled=true|" /usr/local/antmedia/conf/red5.properties | ||
sudo sed -i "/^server.jwtServerSecretKey=/s|.*|server.jwtServerSecretKey=$SECRET_KEY|" /usr/local/antmedia/conf/red5.properties | ||
sudo service antmedia restart | ||
sudo bash /usr/local/antmedia/enable_ssl.sh | ||
- name: Run enable_ssl.sh for existing domain | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.OVH_REMOTE_HOST }} | ||
username: ${{ secrets.OVH_REMOTE_USERNAME }} | ||
key: ${{ secrets.OVH_SSH_PRIVATE_KEY }} | ||
port: ${{ secrets.OVH_REMOTE_PORT }} | ||
#restore the old domain to not encounter any issue | ||
script: | | ||
sudo bash /usr/local/antmedia/enable_ssl.sh -d ${{ secrets.OVH_REMOTE_HOST }} |