Skip to content

Commit a3f16c0

Browse files
iglocskaclaude
andcommitted
fix: [ci] Use MISP's supervisor worker config with path substitution
The inline heredoc had leading whitespace that broke supervisor config parsing. Instead, copy the config from the MISP repo and sed the paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e8c3eff commit a3f16c0

File tree

1 file changed

+3
-36
lines changed

1 file changed

+3
-36
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -252,42 +252,9 @@ jobs:
252252
sudo pip install supervisor
253253
sudo cp $MISP_DIR/build/supervisor/supervisord.conf /etc/supervisord.conf
254254
sudo mkdir -p /etc/supervisor/conf.d
255-
# Generate workers config with correct MISP path
256-
cat > /tmp/50-workers.conf << 'WEOF'
257-
[group:misp-workers]
258-
programs=default,email,cache,prio,update,scheduler
259-
WEOF
260-
for queue in default email cache prio update; do
261-
cat >> /tmp/50-workers.conf << EOF
262-
263-
[program:$queue]
264-
directory=$MISP_DIR
265-
command=$MISP_DIR/app/Console/cake start_worker $queue
266-
process_name=%(program_name)s_%(process_num)02d
267-
numprocs=1
268-
autostart=false
269-
autorestart=true
270-
redirect_stderr=false
271-
stderr_logfile=/tmp/misp-workers-errors.log
272-
stdout_logfile=/tmp/misp-workers.log
273-
user=www-data
274-
EOF
275-
done
276-
cat >> /tmp/50-workers.conf << EOF
277-
278-
[program:scheduler]
279-
directory=$MISP_DIR
280-
command=$MISP_DIR/app/Console/cake scheduler_worker
281-
process_name=%(program_name)s_%(process_num)02d
282-
numprocs=1
283-
autostart=false
284-
autorestart=true
285-
redirect_stderr=false
286-
stderr_logfile=/tmp/misp-workers-errors.log
287-
stdout_logfile=/tmp/misp-workers.log
288-
user=www-data
289-
EOF
290-
sudo cp /tmp/50-workers.conf /etc/supervisor/conf.d/50-workers.conf
255+
# Copy worker config from MISP repo and fix paths
256+
sudo cp $MISP_DIR/build/supervisor/50-workers.conf /etc/supervisor/conf.d/50-workers.conf
257+
sudo sed -i "s|/home/runner/work/MISP/MISP|${MISP_DIR}|g" /etc/supervisor/conf.d/50-workers.conf
291258
sudo python3 -m supervisor.supervisord -c /etc/supervisord.conf
292259
sudo python3 -m supervisor.supervisorctl -c /etc/supervisord.conf start all
293260
sudo python3 -m supervisor.supervisorctl -c /etc/supervisord.conf status

0 commit comments

Comments
 (0)