Skip to content

Commit 126bd08

Browse files
vaibhavGadreCopilot
andcommitted
CHEF-33431: add platform-ui Strategy 0 to wiz.yml
Add Strategy 0 identical to grype.yml and build-docker-image.yml so platform-ui docker build delegates to build-docker.sh for Wiz scans. Handles submodule checkout, NPM_AZURE_KEY secret, and docker buildx build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5589931 commit 126bd08

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/build-docker-image.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ jobs:
7878
BRANCH_NAME="${{ github.head_ref || github.ref_name }}" \
7979
GIT_SHA="${{ github.sha }}" \
8080
APP_VERSION="${{ github.ref_name }}" \
81+
RUN_ID="${{ github.run_id }}" \
8182
LOCALES="en" \
8283
./build-docker.sh
83-
IMAGES="platform-ui:local"
84+
IMAGES="platform-ui:${{ github.run_id }}"
8485
8586
# Strategy 1: Check for build-docker.sh script (e.g., dsm-erchef)
8687
elif [ -f "build-docker.sh" ]; then

.github/workflows/wiz.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,22 @@ jobs:
107107
echo "Building Docker image..."
108108
REPO_NAME=$(basename $(pwd))
109109
110+
# Strategy 0: platform-ui — delegate entirely to build-docker.sh which handles
111+
# submodule checkout (GITHUB_TOKEN), NPM Azure Key secret, and docker buildx build.
112+
if [ "${{ github.event.repository.name }}" = "platform-ui" ]; then
113+
echo "Detected platform-ui - delegating to build-docker.sh"
114+
chmod +x build-docker.sh
115+
GITHUB_TOKEN="${{ secrets.GH_TOKEN }}" \
116+
NPM_AZURE_KEY="${{ secrets.NPM_AZURE_KEY }}" \
117+
BRANCH_NAME="${{ github.head_ref || github.ref_name }}" \
118+
GIT_SHA="${{ github.sha }}" \
119+
APP_VERSION="${{ github.ref_name }}" \
120+
LOCALES="en" \
121+
./build-docker.sh
122+
IMAGES="platform-ui:local"
123+
110124
# Strategy 1: Check for build-docker.sh script (e.g., dsm-erchef)
111-
if [ -f "build-docker.sh" ]; then
125+
elif [ -f "build-docker.sh" ]; then
112126
echo "Found build-docker.sh script - using it to build images"
113127
chmod +x build-docker.sh
114128
GITHUB_TOKEN="${{ secrets.GH_TOKEN }}" ./build-docker.sh

0 commit comments

Comments
 (0)