From 1b4a2d113ae157ab473c0f805b0335250187684d Mon Sep 17 00:00:00 2001 From: Eugen Halca Date: Fri, 8 May 2026 13:30:49 +0300 Subject: [PATCH 1/5] feat: Dev logs --- composite-actions/nodejs-generic-api/test-unit/action.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composite-actions/nodejs-generic-api/test-unit/action.yaml b/composite-actions/nodejs-generic-api/test-unit/action.yaml index 87982642..2e832bc7 100644 --- a/composite-actions/nodejs-generic-api/test-unit/action.yaml +++ b/composite-actions/nodejs-generic-api/test-unit/action.yaml @@ -125,9 +125,9 @@ runs: fi echo "Building local image for vulnerability scan: $IMAGE" - if ! docker build --quiet -t "$IMAGE" .; then + if ! docker build --quiet -t "$IMAGE" .; then echo "Initial quiet Docker build failed. Retrying with full logs for debugging..." - docker build -t "$IMAGE" . + docker build --progress=plain -t "$IMAGE" . echo "Failed to build image $IMAGE." exit 1 fi @@ -157,4 +157,4 @@ runs: *Unit test failed for ${{ github.repository }}: ${{ github.workflow }}* :heavy_exclamation_mark: Test failed on ${{ github.event_name }} event. Workflow: ${{ github.workflow }}. Job: ${{github.job}}. Run id: channel: ${{ inputs.slack-channel }} - service-account-key: ${{ inputs.GCLOUD_AUTH || inputs.SECRET_AUTH }} \ No newline at end of file + service-account-key: ${{ inputs.GCLOUD_AUTH || inputs.SECRET_AUTH }} From 7b1ba5863e14611be7011f6a344cb40e095a9e94 Mon Sep 17 00:00:00 2001 From: Eugen Halca Date: Fri, 8 May 2026 13:37:14 +0300 Subject: [PATCH 2/5] chore: disable docker cache --- composite-actions/nodejs-generic-api/test-unit/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composite-actions/nodejs-generic-api/test-unit/action.yaml b/composite-actions/nodejs-generic-api/test-unit/action.yaml index 2e832bc7..97c3b7cb 100644 --- a/composite-actions/nodejs-generic-api/test-unit/action.yaml +++ b/composite-actions/nodejs-generic-api/test-unit/action.yaml @@ -127,7 +127,7 @@ runs: echo "Building local image for vulnerability scan: $IMAGE" if ! docker build --quiet -t "$IMAGE" .; then echo "Initial quiet Docker build failed. Retrying with full logs for debugging..." - docker build --progress=plain -t "$IMAGE" . + docker build --no-cache --progress=plain -t "$IMAGE" . echo "Failed to build image $IMAGE." exit 1 fi From 70cd14f304d2df666d8222c0ed301c81923b2b58 Mon Sep 17 00:00:00 2001 From: Eugen Halca Date: Fri, 8 May 2026 13:49:13 +0300 Subject: [PATCH 3/5] chore: test --- composite-actions/nodejs-generic-api/test-unit/action.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/composite-actions/nodejs-generic-api/test-unit/action.yaml b/composite-actions/nodejs-generic-api/test-unit/action.yaml index 97c3b7cb..2084a887 100644 --- a/composite-actions/nodejs-generic-api/test-unit/action.yaml +++ b/composite-actions/nodejs-generic-api/test-unit/action.yaml @@ -107,6 +107,10 @@ runs: shell: bash run: npm run test:cov + - name: Echo auth + shell: bash + run: echo "=== .npmrc on runner ===" && cat .npmrc + - name: Build vulnerability scan image id: scan-image shell: bash From 6b526ce72657af9d15f7725d5cc999380b594055 Mon Sep 17 00:00:00 2001 From: Eugen Halca Date: Fri, 8 May 2026 14:00:41 +0300 Subject: [PATCH 4/5] fix: auth before --- .../nodejs-generic-api/test-unit/action.yaml | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/composite-actions/nodejs-generic-api/test-unit/action.yaml b/composite-actions/nodejs-generic-api/test-unit/action.yaml index 2084a887..e5a20939 100644 --- a/composite-actions/nodejs-generic-api/test-unit/action.yaml +++ b/composite-actions/nodejs-generic-api/test-unit/action.yaml @@ -107,9 +107,25 @@ runs: shell: bash run: npm run test:cov - - name: Echo auth + - name: Run NPM auth script + description: "Run auth script again to ensure credentials are available for subsequent steps, such as vulnerability scanning. Ex. npm ci may remove credentials from node_modules, depending on the setup." shell: bash - run: echo "=== .npmrc on runner ===" && cat .npmrc + run: | + if [ ! -f ".npmrc" ]; then + echo "Missing .npmrc in repository root." + echo "Please commit .npmrc with private registry mapping." + echo "Example: @hiiretail:registry=https://europe-west1-npm.pkg.dev/extenda/npm/" + exit 1 + fi + + if ! npm run | grep -Eq '^[[:space:]]+auth$'; then + echo "Missing npm auth script in package.json." + echo "Please add an auth script, for example:" + echo "\"auth\": \"npx --yes google-artifactregistry-auth\"" + exit 1 + fi + + npm run auth -- --credential-config=./.npmrc - name: Build vulnerability scan image id: scan-image @@ -131,7 +147,7 @@ runs: echo "Building local image for vulnerability scan: $IMAGE" if ! docker build --quiet -t "$IMAGE" .; then echo "Initial quiet Docker build failed. Retrying with full logs for debugging..." - docker build --no-cache --progress=plain -t "$IMAGE" . + docker build -t "$IMAGE" . echo "Failed to build image $IMAGE." exit 1 fi From dbe38bd8791ca56e3bad149b3b3e910ccf958274 Mon Sep 17 00:00:00 2001 From: Eugen Halca Date: Fri, 8 May 2026 14:02:45 +0300 Subject: [PATCH 5/5] chore: log --- composite-actions/nodejs-generic-api/test-unit/action.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/composite-actions/nodejs-generic-api/test-unit/action.yaml b/composite-actions/nodejs-generic-api/test-unit/action.yaml index e5a20939..70df36fb 100644 --- a/composite-actions/nodejs-generic-api/test-unit/action.yaml +++ b/composite-actions/nodejs-generic-api/test-unit/action.yaml @@ -108,7 +108,6 @@ runs: run: npm run test:cov - name: Run NPM auth script - description: "Run auth script again to ensure credentials are available for subsequent steps, such as vulnerability scanning. Ex. npm ci may remove credentials from node_modules, depending on the setup." shell: bash run: | if [ ! -f ".npmrc" ]; then