Skip to content

Commit 5cce2cf

Browse files
updated cicd
1 parent 34a4b4f commit 5cce2cf

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

DocuSign.Workspaces/DocuSign.Workspaces/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,20 @@ else
2121
echo "Unable to locate DocuSign.Workspaces.csproj in build context"
2222
exit 1
2323
fi
24+
PROJECT_DIR="$(dirname "$SELECTED_PROJECT")"
25+
SPA_DIR="$PROJECT_DIR/ClientApp"
26+
27+
if [ -d "$SPA_DIR" ]; then
28+
npm ci --prefix "$SPA_DIR" --legacy-peer-deps
29+
npm run build --prefix "$SPA_DIR"
30+
fi
2431
dotnet restore "$SELECTED_PROJECT"
2532
dotnet publish "$SELECTED_PROJECT" -c Release -o /app/publish --no-restore
33+
34+
if [ -d "$SPA_DIR/build" ]; then
35+
mkdir -p /app/publish/ClientApp
36+
cp -a "$SPA_DIR/build" /app/publish/ClientApp/
37+
fi
2638
BASH
2739

2840
FROM base AS final

DocuSign.Workspaces/DocuSign.Workspaces/entrypoint.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
set -e
33

44
if [ -n "${DOCUSIGN_PRIVATE_KEY_BASE64:-}" ]; then
5-
echo "$DOCUSIGN_PRIVATE_KEY_BASE64" | base64 -d > /app/private.key
6-
chmod 600 /app/private.key
5+
if printf "%s" "$DOCUSIGN_PRIVATE_KEY_BASE64" | base64 -d > /app/private.key 2>/dev/null; then
6+
chmod 600 /app/private.key
7+
elif [ -n "${DOCUSIGN_PRIVATE_KEY:-}" ]; then
8+
printf "%s" "$DOCUSIGN_PRIVATE_KEY" > /app/private.key
9+
chmod 600 /app/private.key
10+
else
11+
echo "DOCUSIGN_PRIVATE_KEY_BASE64 is set but invalid; no private key written." >&2
12+
fi
713
elif [ -n "${DOCUSIGN_PRIVATE_KEY:-}" ]; then
814
printf "%s" "$DOCUSIGN_PRIVATE_KEY" > /app/private.key
915
chmod 600 /app/private.key

0 commit comments

Comments
 (0)