瀏覽代碼

feat(lint): add tpl lint step for each project (#1983)

* feat(lint): add tpl lint step for each project

* fix path

* fix path

* include jicofo and jibri

* temp cat to test

* more templates to lint

* fix path

* fix jigasi password b64 default behavior
Aaron van Meerten 5 月之前
父節點
當前提交
909820274c
共有 2 個文件被更改,包括 35 次插入4 次删除
  1. 33 1
      .github/workflows/ci.yml
  2. 2 3
      jigasi/rootfs/defaults/xmpp-sip-communicator.properties

+ 33 - 1
.github/workflows/ci.yml

@@ -27,12 +27,44 @@ jobs:
         esac
         wget -qO /tmp/tpl https://github.com/jitsi/tpl/releases/download/v1.4.0/tpl-linux-${TPL_ARCH}
         chmod +x /tmp/tpl
-    - name: Run tpl with default values for system-config.js
+    - name: Run tpl with default values for web
       run:  |
         /tmp/tpl web/rootfs/defaults/system-config.js > /tmp/config.js
         /tmp/tpl web/rootfs/defaults/settings-config.js >> /tmp/config.js
     - name: Check config.js syntax
       run: node /tmp/config.js
+    - name: Run tpl with default values for jvb
+      run:  |
+        /tmp/tpl jvb/rootfs/defaults/jvb.conf > /tmp/jvb.conf
+        /tmp/tpl jvb/rootfs/defaults/logging.properties > /tmp/logging.properties
+        /tmp/tpl jvb/rootfs/defaults/autoscaler-sidecar.config > /tmp/autoscaler-sidecar.config
+    - name: Run tpl with default values for jicofo
+      run:  |
+        /tmp/tpl jicofo/rootfs/defaults/jicofo.conf > /tmp/jicofo.conf
+        /tmp/tpl jicofo/rootfs/defaults/logging.properties > /tmp/logging.properties
+    - name: Run tpl with default values for jibri
+      run:  |
+        /tmp/tpl jibri/rootfs/defaults/jibri.conf > /tmp/jibri.conf
+        /tmp/tpl jibri/rootfs/defaults/logging.properties > /tmp/logging.properties
+        /tmp/tpl jibri/rootfs/defaults/xmpp.conf > /tmp/xmpp.conf
+        /tmp/tpl jibri/rootfs/defaults/xorg-video-dummy.conf > /tmp/xorg-video-dummy.conf
+        /tmp/tpl jibri/rootfs/defaults/autoscaler-sidecar.config > /tmp/autoscaler-sidecar.config
+    - name: Run tpl with default values for jigasi
+      run:  |
+        /tmp/tpl jigasi/rootfs/defaults/sip-communicator.properties > /tmp/sip-communicator.properties
+        /tmp/tpl jigasi/rootfs/defaults/sipserver-sip-communicator.properties > /tmp/xmpp-sip-communicator.properties
+        /tmp/tpl jigasi/rootfs/defaults/transcriber-sip-communicator.properties > /tmp/xmpp-sip-communicator.properties
+        /tmp/tpl jigasi/rootfs/defaults/xmpp-sip-communicator.properties > /tmp/xmpp-sip-communicator.properties
+        /tmp/tpl jigasi/rootfs/defaults/logging.properties > /tmp/logging.properties
+        /tmp/tpl jigasi/rootfs/defaults/autoscaler-sidecar.config > /tmp/autoscaler-sidecar.config
+    - name: Run tpl with default values for prosody
+      run:  |
+        /tmp/tpl prosody/rootfs/defaults/prosody.cfg.lua > /tmp/prosody.cfg.lua
+        /tmp/tpl prosody/rootfs/defaults/saslauthd.conf > /tmp/saslauthd.conf
+        /tmp/tpl prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua > /tmp/jitsi-meet.cfg.lua
+        /tmp/tpl prosody/rootfs/defaults/conf.d/brewery.cfg.lua > /tmp/brewery.cfg.lua
+        /tmp/tpl prosody/rootfs/defaults/conf.d/visitors.cfg.lua > /tmp/visitors.cfg.lua
+        /tmp/tpl prosody/rootfs/defaults/rules.d/jvb_muc_presence_filter.pfw > /tmp/jvb_muc_presence_filter.pfw
   build:
     runs-on: ubuntu-latest
     steps:

+ 2 - 3
jigasi/rootfs/defaults/xmpp-sip-communicator.properties

@@ -1,5 +1,6 @@
 {{ $JIGASI_BREWERY_MUC := .Env.JIGASI_BREWERY_MUC | default "jigasibrewery" -}}
 {{ $JIGASI_XMPP_USER := .Env.JIGASI_XMPP_USER | default "jigasi" -}}
+{{ $JIGASI_XMPP_PASSWORD := .Env.JIGASI_XMPP_PASSWORD | default "replaceme" -}}
 {{ $PUBLIC_URL_DOMAIN := .Env.PUBLIC_URL | default "https://localhost:8443" | trimPrefix "https://" | trimSuffix "/" -}}
 {{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}}
 {{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}}
@@ -7,8 +8,6 @@
 {{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}}
 {{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}}
 {{ $XMPP_SERVERS := splitList "," $XMPP_SERVER | compact -}}
-{{/* assign env from context, preserve during range when . is re-assigned */}}
-{{ $ENV := .Env -}}
 
 # XMPP account used for control
 {{ range $index, $element := $XMPP_SERVERS -}}
@@ -22,7 +21,7 @@ net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.IS_SERVER_OVERRIDDE
 net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.SERVER_ADDRESS={{ $SERVER._0 }}
 net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.SERVER_PORT={{ $SERVER._1 | default $XMPP_PORT }}
 net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.ALLOW_NON_SECURE=true
-net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.PASSWORD={{ $ENV.JIGASI_XMPP_PASSWORD | b64enc }}
+net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.PASSWORD={{ $JIGASI_XMPP_PASSWORD | b64enc }}
 net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.AUTO_GENERATE_RESOURCE=true
 net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.RESOURCE_PRIORITY=30
 net.java.sip.communicator.impl.protocol.jabber.acc-{{ $ID }}.KEEP_ALIVE_METHOD=XEP-0199