Skip to content

Commit 7aa0534

Browse files
author
Michael Eichelbeck
committed
refactor(v2): cut over native runtime
1 parent f05e715 commit 7aa0534

312 files changed

Lines changed: 1637 additions & 75336 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 2 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ jobs:
8787
- name: Check provider CLI helper
8888
run: npm run check:agent-cli-provider:ci
8989

90-
- name: Hosted private CLI and target tests
91-
run: npm run test:hosted
90+
- name: Hosted target tests
91+
run: npm run test:hosted-target
9292
timeout-minutes: 5
9393

9494
- name: Unit tests with coverage (fast)
@@ -139,98 +139,6 @@ jobs:
139139
run: npm run test:e2e:docker
140140
timeout-minutes: 15
141141

142-
hosted-oecp-relevance:
143-
name: Hosted OECP image relevance
144-
runs-on: ubuntu-latest
145-
outputs:
146-
relevant: ${{ steps.relevance.outputs.relevant }}
147-
steps:
148-
- name: Checkout candidate
149-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
150-
with:
151-
fetch-depth: 0
152-
persist-credentials: false
153-
ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha || github.sha }}
154-
155-
- name: Determine hosted image relevance
156-
id: relevance
157-
run: node scripts/hosted-oecp-ci-relevance.js
158-
159-
hosted-oecp-image:
160-
name: Hosted OECP private image
161-
needs: hosted-oecp-relevance
162-
if: needs.hosted-oecp-relevance.outputs.relevant == 'true'
163-
runs-on: ubuntu-latest
164-
timeout-minutes: 30
165-
env:
166-
HOSTED_OECP_IMAGE: zeroshot-oecp:ci-${{ github.run_id }}-${{ github.run_attempt }}
167-
TRIVY_IMAGE: docker.io/aquasec/trivy:0.73.0@sha256:7cced7cae583819fc7806d4cbc0dbbc7cad18b99f7d3e235192e6da8c091045c
168-
steps:
169-
- name: Checkout candidate
170-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
171-
with:
172-
persist-credentials: false
173-
174-
- name: Setup Node.js
175-
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
176-
with:
177-
node-version: 22
178-
cache: 'npm'
179-
180-
- name: Install dependencies
181-
run: npm ci
182-
183-
- name: Build agent CLI provider
184-
run: npm run build:agent-cli-provider
185-
186-
- name: Build hosted OECP image
187-
run: node scripts/hosted-oecp-image.js build "$HOSTED_OECP_IMAGE"
188-
189-
- name: Inspect hosted OECP image
190-
run: node scripts/hosted-oecp-image.js inspect "$HOSTED_OECP_IMAGE"
191-
192-
- name: Smoke hosted OECP image
193-
run: node scripts/hosted-oecp-image.js smoke "$HOSTED_OECP_IMAGE"
194-
195-
- name: Record Trivy and vulnerability database identity
196-
shell: bash
197-
env:
198-
TRIVY_CACHE_DIR: ${{ runner.temp }}/trivy-cache
199-
run: |
200-
set -euo pipefail
201-
mkdir -p "$TRIVY_CACHE_DIR"
202-
echo "Trivy scanner image: $TRIVY_IMAGE"
203-
docker run --rm \
204-
--volume "$TRIVY_CACHE_DIR:/root/.cache/trivy" \
205-
"$TRIVY_IMAGE" image --cache-dir /root/.cache/trivy --download-db-only
206-
docker run --rm \
207-
--volume "$TRIVY_CACHE_DIR:/root/.cache/trivy" \
208-
"$TRIVY_IMAGE" version --cache-dir /root/.cache/trivy --format json
209-
210-
- name: Scan hosted OECP npm lockfile vulnerabilities
211-
shell: bash
212-
env:
213-
TRIVY_CACHE_DIR: ${{ runner.temp }}/trivy-cache
214-
run: |
215-
set -euo pipefail
216-
echo "Trivy filesystem scan target: docker/zeroshot-oecp"
217-
echo "Trivy vulnerability scope: library lockfiles, fixed HIGH/CRITICAL vulnerabilities"
218-
docker run --rm \
219-
--volume "$TRIVY_CACHE_DIR:/root/.cache/trivy" \
220-
--volume "$GITHUB_WORKSPACE:/workspace:ro" \
221-
--workdir /workspace \
222-
"$TRIVY_IMAGE" fs \
223-
--cache-dir /root/.cache/trivy \
224-
--scanners vuln \
225-
--pkg-types library \
226-
--severity HIGH,CRITICAL \
227-
--ignore-unfixed \
228-
--exit-code 1 \
229-
--skip-db-update \
230-
--offline-scan \
231-
--no-progress \
232-
docker/zeroshot-oecp
233-
234142
# Cross-platform/version compatibility (main only)
235143
# NOTE: macOS runners cost 10x Linux minutes - keep this scoped to main.
236144
install-matrix:
@@ -362,18 +270,13 @@ jobs:
362270
- check
363271
- install-matrix
364272
- release-preflight
365-
- hosted-oecp-relevance
366-
- hosted-oecp-image
367273
runs-on: ubuntu-latest
368274
steps:
369275
- name: Require every applicable CI gate
370276
env:
371277
CHECK_RESULT: ${{ needs.check.result }}
372278
INSTALL_MATRIX_RESULT: ${{ needs.install-matrix.result }}
373279
RELEASE_PREFLIGHT_RESULT: ${{ needs.release-preflight.result }}
374-
HOSTED_OECP_RELEVANCE_RESULT: ${{ needs.hosted-oecp-relevance.result }}
375-
HOSTED_OECP_RELEVANT: ${{ needs.hosted-oecp-relevance.outputs.relevant }}
376-
HOSTED_OECP_IMAGE_RESULT: ${{ needs.hosted-oecp-image.result }}
377280
run: |
378281
if [[ "$CHECK_RESULT" != "success" ]]; then
379282
echo "::error::check concluded with $CHECK_RESULT"
@@ -387,19 +290,3 @@ jobs:
387290
echo "::error::release-preflight concluded with $RELEASE_PREFLIGHT_RESULT"
388291
exit 1
389292
fi
390-
if [[ "$HOSTED_OECP_RELEVANCE_RESULT" != "success" ]]; then
391-
echo "::error::hosted-oecp-relevance concluded with $HOSTED_OECP_RELEVANCE_RESULT"
392-
exit 1
393-
fi
394-
if [[ "$HOSTED_OECP_RELEVANT" != "true" && "$HOSTED_OECP_RELEVANT" != "false" ]]; then
395-
echo "::error::hosted-oecp-relevance emitted invalid relevance: $HOSTED_OECP_RELEVANT"
396-
exit 1
397-
fi
398-
if [[ "$HOSTED_OECP_RELEVANT" == "true" && "$HOSTED_OECP_IMAGE_RESULT" != "success" ]]; then
399-
echo "::error::hosted-oecp-image concluded with $HOSTED_OECP_IMAGE_RESULT for relevant changes"
400-
exit 1
401-
fi
402-
if [[ "$HOSTED_OECP_RELEVANT" == "false" && "$HOSTED_OECP_IMAGE_RESULT" != "skipped" ]]; then
403-
echo "::error::hosted-oecp-image concluded with $HOSTED_OECP_IMAGE_RESULT for irrelevant changes"
404-
exit 1
405-
fi

0 commit comments

Comments
 (0)