Skip to content

Commit

Permalink
first iteration of bat
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesimpson36 committed Jul 30, 2024
1 parent 98f327a commit e499b64
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
24 changes: 24 additions & 0 deletions c8run/internal/run.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@


@echo off

set EXPECTED_JAVA_VERSION=21

set SUBCOMMAND=%~1

@REM Configuration file defaults overriden because upstream config doesn't export to elasticsearch
setx ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_CLASSNAME "io.camunda.zeebe.exporter.ElasticsearchExporter"
setx ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_URL "http://localhost:9200"
setx ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_INDEX_PREFIX "zeebe-record"

if %SUBCOMMAND% == "start" (

)

if %SUBCOMMAND% == "stop" (

)

if %SUBCOMMAND% == "help" (

)
34 changes: 34 additions & 0 deletions c8run/start.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

@echo off

:checkCamundaStartup
set RETRIES=24
set SLEEP_TIME=14
set URL=%~1
set NAME=%~2
set COMMAND="curl -XGET %URL%"

:loop
%COMMAND%
set commandErrorLevel=%ERROR_LEVEL%
timeout /NOBREAK %SLEEP_TIME%
set RETRIES=%RETRIES%-1

if %RETRIES% == 0 (
echo "Error: %NAME% did not start!"
EXIT /B 1
)
echo "Polling %NAME% ... %RETRIES% retries left"

if %commandErrorLevel% NEQ 0 (
goto loop
)
echo "%NAME% has successfully been started."
start %URL%
EXIT /B 0

set URL="http://localhost:8080/operate/login"
start /B checkCamundaStartup "%URL%" "Camunda"

@REM start /B internal\run.bat
call internal\run.bat %*

0 comments on commit e499b64

Please sign in to comment.