Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion .github/workflows/4_builderprecompiled_base-dev-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,33 @@ jobs:
${{ inputs.docker_run_extra_args }} \
quay.io/wazuh/osd-dev:${platform_version} \
bash -c '
set -e;
yarn config set registry https://registry.yarnpkg.com;
cd /home/node/kbn/plugins/wazuh-security-plugin && yarn && ${{ inputs.command }};

cd /home/node/kbn/plugins/wazuh-security-plugin;

max_attempts="${RETRY_MAX_ATTEMPTS:-3}";
delay_seconds="${RETRY_DELAY_SECONDS:-15}";
attempt=1;

while [ "${attempt}" -le "${max_attempts}" ]; do
echo "Performing yarn install (attempt ${attempt}/${max_attempts})...";
if yarn install --non-interactive; then
break;
else
exit_code=$?;
fi;
if [ "${attempt}" -ge "${max_attempts}" ]; then
echo "yarn install failed after ${max_attempts} attempts (exit code ${exit_code})." >&2;
exit "${exit_code}";
fi;

echo "yarn install failed (attempt ${attempt}/${max_attempts}, exit ${exit_code}). Retrying in ${delay_seconds}s..." >&2;
sleep "${delay_seconds}";
attempt=$((attempt + 1));
done;

${{ inputs.command }};
'
- name: Get the plugin version and format reference name
run: |
Expand Down
27 changes: 26 additions & 1 deletion .github/workflows/dev-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,33 @@ jobs:
${{ inputs.docker_run_extra_args }} \
quay.io/wazuh/osd-dev:${platform_version} \
bash -c '
set -e;
yarn config set registry https://registry.yarnpkg.com;
cd /home/node/kbn/plugins/wazuh-security-plugin && yarn && ${{ inputs.command }};

cd /home/node/kbn/plugins/wazuh-security-plugin;

max_attempts="${RETRY_MAX_ATTEMPTS:-3}";
delay_seconds="${RETRY_DELAY_SECONDS:-15}";
attempt=1;

while [ "${attempt}" -le "${max_attempts}" ]; do
echo "Performing yarn install (attempt ${attempt}/${max_attempts})...";
if yarn install --non-interactive; then
break;
else
exit_code=$?;
fi;
if [ "${attempt}" -ge "${max_attempts}" ]; then
echo "yarn install failed after ${max_attempts} attempts (exit code ${exit_code})." >&2;
exit "${exit_code}";
fi;

echo "yarn install failed (attempt ${attempt}/${max_attempts}, exit ${exit_code}). Retrying in ${delay_seconds}s..." >&2;
sleep "${delay_seconds}";
attempt=$((attempt + 1));
done;

${{ inputs.command }};
'
- name: Get the plugin version and format reference name
run: |
Expand Down
Loading