elsa-core/docker/entrypoint.sh
Sipke Schoorstra 6e6a66e3f5
Add WorkflowStateCommitted notification support and update state handling logic
- Introduced `WorkflowStateCommitted` notification to encapsulate workflow execution context, state, and instance details.
- Updated `DefaultCommitStateHandler` to publish `WorkflowStateCommitted` via `IMediator`.
- Adjusted `DispatchWorkflowExtensions` to use `WorkflowStateCommitted` for workflow completion.

Updates KubernetesClient and Microsoft packages (#6917)

* Remove Proto.Cluster.Kubernetes dependency due to vulnerability

- Temporarily removed `Proto.Cluster.Kubernetes` package and provider integration because of a vulnerability in its dependency (https://avd.aquasec.com/nvd/2025/cve-2025-9708).
- Adjusted related cluster provider and remote configuration logic.
- Updated `PortAttribute` default parameter for clarity.

* Revert "Remove Proto.Cluster.Kubernetes dependency due to vulnerability"

This reverts commit 0720d970968e4f7338825407258b34ddffb1d2a4.

* Add KubernetesClient package and update MicrosoftVersion to 9.0.9

- Added `KubernetesClient` package to the project dependencies.
- Updated `MicrosoftVersion` to `9.0.9` in `Directory.Packages.props`.
Update Polly packages

- Bump Polly and Polly.Extensions package versions to 8.6.3.

Update `Microsoft.AspNetCore.Authorization` to use `MicrosoftVersion` property

Ensure Docker images ship CA trust and add TLS smoke tests (#6918)


Remove TlsSmoke project and related solution references

- Deleted `TlsSmoke` project files (`Program.cs` and `TlsSmoke.csproj`).
- Removed `TlsSmoke` project reference from the solution file (`Elsa.sln`).

Add comprehensive Copilot coding agent instructions for repository onboarding (#6920)

* Initial plan

* Add comprehensive .github/copilot-instructions.md with validated build instructions

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
Add ForEach tests, introduce asynchronous workflow runner and enhance workflow events. (#6926)

* Introduce asynchronous workflow runner and enhance workflow events.

- Added `AsyncWorkflowRunner` to enable asynchronous workflow execution and result tracking.
- Introduced new event arguments, such as `ActivityExecutedEventArgs` and `WorkflowStateCommittedEventArgs`.
- Expanded `WorkflowEvents` class to include `ActivityExecuted`, `ActivityExecutedLogUpdated`, and `WorkflowStateCommitted` events.
- Refactored event arguments into the `Elsa.Testing.Shared.EventArgs` namespace.
- Enhanced tests with `AsyncWorkflowRunner` and new event-driven workflow scenarios.

* Refactor event argument classes to unify namespace and simplify inheritance

* Add shared component DotSettings file to support namespace exclusions
Refactor `WaitAsync` call in `DispatchWorkflowsTests` to remove unnecessary generic type.
2025-09-25 20:54:38 +02:00

104 lines
2.5 KiB
Bash
Executable file

#!/bin/sh
set -e
log() {
printf '%s\n' "$*" >&2
}
normalise_dest_name() {
name=$(basename "$1")
case "$name" in
*.crt|*.pem) printf '%s\n' "$name" ;;
*) printf '%s.crt\n' "$name" ;;
esac
}
install_extra_certificates() {
cert_source="$1"
if [ ! -e "$cert_source" ]; then
log "EXTRA_CA_CERT path '$cert_source' does not exist; skipping installation."
return
fi
target_root="/usr/local/share/ca-certificates/extra"
mkdir -p "$target_root"
rm -f "$target_root"/* 2>/dev/null || true
copied=0
if [ -f "$cert_source" ]; then
dest_name=$(normalise_dest_name "$cert_source")
cp "$cert_source" "$target_root/$dest_name"
copied=1
elif [ -d "$cert_source" ]; then
for file in "$cert_source"/*.crt "$cert_source"/*.pem; do
[ -f "$file" ] || continue
dest_name=$(normalise_dest_name "$file")
cp "$file" "$target_root/$dest_name"
copied=1
done
else
log "EXTRA_CA_CERT path '$cert_source' is neither a file nor a directory; skipping installation."
return
fi
if [ "$copied" -eq 0 ]; then
log "No certificate files found at '$cert_source'; skipping installation."
return
fi
if command -v update-ca-certificates >/dev/null 2>&1; then
if ! update-ca-certificates >/dev/null 2>&1; then
update-ca-certificates
fi
log "Installed custom certificate(s) from '$cert_source'."
elif command -v trust >/dev/null 2>&1; then
# Shellcheck disable because we intentionally glob.
# shellcheck disable=SC2086
for cert in "$target_root"/*.crt; do
[ -f "$cert" ] || continue
trust anchor "$cert"
done
log "Installed custom certificate(s) using 'trust' utility."
else
log "No known certificate installation tool found; custom CA may not be applied."
fi
}
maybe_instrument_with_otel() {
if [ "${ELSA_SKIP_OTEL_AUTO:-0}" = "1" ]; then
return
fi
if [ -z "${OTEL_DOTNET_AUTO_HOME:-}" ]; then
return
fi
instrument_script="${OTEL_DOTNET_AUTO_HOME%/}/instrument.sh"
if [ ! -f "$instrument_script" ]; then
return
fi
if ! command -v bash >/dev/null 2>&1; then
log "OpenTelemetry auto-instrumentation requested but bash is unavailable; skipping."
return
fi
tmp_wrapper="/tmp/elsa-otel-wrapper.sh"
cat <<'WRAPPER' > "$tmp_wrapper"
#!/usr/bin/env bash
set -e
. "${OTEL_DOTNET_AUTO_HOME%/}/instrument.sh"
exec "$@"
WRAPPER
chmod +x "$tmp_wrapper"
exec "$tmp_wrapper" "$@"
}
if [ -n "${EXTRA_CA_CERT:-}" ]; then
install_extra_certificates "$EXTRA_CA_CERT"
fi
maybe_instrument_with_otel "$@"
exec "$@"