ci: pin actions and scan both GIS and AI images
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 22s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s
GeoIntel release gates / AI image, SBOM and container scan (push) Canceled after 0s
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 22s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s
GeoIntel release gates / AI image, SBOM and container scan (push) Canceled after 0s
This commit is contained in:
@@ -2,7 +2,7 @@ name: GeoIntel release gates
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, develop, "codex/**", "build/**"]
|
branches: [main, develop, "codex/**", "build/**", "chatgpt/**"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main, develop]
|
branches: [main, develop]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -20,18 +20,20 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Secret scan
|
- name: Secret scan
|
||||||
uses: trufflesecurity/trufflehog@v3.79.0
|
uses: trufflesecurity/trufflehog@20652fbbdefffcdaa493a5bf57ab2ac6b1db715b
|
||||||
with:
|
with:
|
||||||
path: ./
|
path: ./
|
||||||
extra_args: --only-verified
|
extra_args: --only-verified
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
|
||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
cache: pip
|
cache: pip
|
||||||
cache-dependency-path: backend/requirements-ci.lock
|
cache-dependency-path: backend/requirements-ci.lock
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version: "20"
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -58,7 +60,7 @@ jobs:
|
|||||||
docker compose config > artifacts/docker-compose.resolved.yml
|
docker compose config > artifacts/docker-compose.resolved.yml
|
||||||
- name: Publish quality evidence
|
- name: Publish quality evidence
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||||
with:
|
with:
|
||||||
name: quality-evidence
|
name: quality-evidence
|
||||||
path: |
|
path: |
|
||||||
@@ -72,13 +74,15 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||||
- uses: actions/setup-python@v5
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
|
||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
cache: pip
|
cache: pip
|
||||||
cache-dependency-path: backend/requirements-ci.lock
|
cache-dependency-path: backend/requirements-ci.lock
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version: "20"
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -95,7 +99,7 @@ jobs:
|
|||||||
npm audit --audit-level=high --json > ../artifacts/npm-audit.json
|
npm audit --audit-level=high --json > ../artifacts/npm-audit.json
|
||||||
- name: Publish dependency evidence
|
- name: Publish dependency evidence
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||||
with:
|
with:
|
||||||
name: dependency-audits
|
name: dependency-audits
|
||||||
path: |
|
path: |
|
||||||
@@ -105,13 +109,15 @@ jobs:
|
|||||||
if-no-files-found: warn
|
if-no-files-found: warn
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
container:
|
container-gis:
|
||||||
name: GIS image, SBOM and container scan
|
name: GIS image, SBOM and container scan
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||||
- name: Build non-AI release image
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Build GIS release image
|
||||||
env:
|
env:
|
||||||
RELEASE_SHA: ${{ gitea.sha }}
|
RELEASE_SHA: ${{ gitea.sha }}
|
||||||
run: |
|
run: |
|
||||||
@@ -124,22 +130,65 @@ jobs:
|
|||||||
--build-arg GEOINTEL_BUILD_TIME="$BUILD_TIME" \
|
--build-arg GEOINTEL_BUILD_TIME="$BUILD_TIME" \
|
||||||
-t "geointel-ci:$RELEASE_SHA-gis" \
|
-t "geointel-ci:$RELEASE_SHA-gis" \
|
||||||
.
|
.
|
||||||
docker image inspect "geointel-ci:$RELEASE_SHA-gis" > artifacts/image-inspect.json
|
docker image inspect "geointel-ci:$RELEASE_SHA-gis" > artifacts/image-inspect-gis.json
|
||||||
- name: Generate SPDX SBOM
|
- name: Generate GIS SPDX SBOM
|
||||||
env:
|
env:
|
||||||
RELEASE_SHA: ${{ gitea.sha }}
|
RELEASE_SHA: ${{ gitea.sha }}
|
||||||
run: bash scripts/generate_container_sbom.sh "geointel-ci:$RELEASE_SHA-gis"
|
run: bash scripts/generate_container_sbom.sh "geointel-ci:$RELEASE_SHA-gis"
|
||||||
- name: Enforce container vulnerability policy
|
- name: Enforce GIS container vulnerability policy
|
||||||
env:
|
env:
|
||||||
RELEASE_SHA: ${{ gitea.sha }}
|
RELEASE_SHA: ${{ gitea.sha }}
|
||||||
run: bash scripts/scan_container_image.sh "geointel-ci:$RELEASE_SHA-gis"
|
run: bash scripts/scan_container_image.sh "geointel-ci:$RELEASE_SHA-gis"
|
||||||
- name: Publish container evidence
|
- name: Publish GIS container evidence
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||||
with:
|
with:
|
||||||
name: container-evidence
|
name: container-gis-evidence
|
||||||
path: |
|
path: |
|
||||||
artifacts/image-inspect.json
|
artifacts/image-inspect-gis.json
|
||||||
|
artifacts/geointel-sbom.spdx.json
|
||||||
|
artifacts/geointel-container-vulnerabilities.json
|
||||||
|
if-no-files-found: warn
|
||||||
|
retention-days: 30
|
||||||
|
|
||||||
|
container-ai:
|
||||||
|
name: AI image, SBOM and container scan
|
||||||
|
if: ${{ gitea.event_name == 'pull_request' || gitea.ref == 'refs/heads/main' || gitea.event_name == 'workflow_dispatch' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 90
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Build AI release image
|
||||||
|
env:
|
||||||
|
RELEASE_SHA: ${{ gitea.sha }}
|
||||||
|
run: |
|
||||||
|
mkdir -p artifacts
|
||||||
|
BUILD_TIME="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
||||||
|
docker build \
|
||||||
|
-f deploy/unraid/Dockerfile.all-in-one \
|
||||||
|
--build-arg GEOINTEL_INSTALL_AI=true \
|
||||||
|
--build-arg GEOINTEL_BUILD_SHA="$RELEASE_SHA" \
|
||||||
|
--build-arg GEOINTEL_BUILD_TIME="$BUILD_TIME" \
|
||||||
|
-t "geointel-ci:$RELEASE_SHA-ai" \
|
||||||
|
.
|
||||||
|
docker image inspect "geointel-ci:$RELEASE_SHA-ai" > artifacts/image-inspect-ai.json
|
||||||
|
- name: Generate AI SPDX SBOM
|
||||||
|
env:
|
||||||
|
RELEASE_SHA: ${{ gitea.sha }}
|
||||||
|
run: bash scripts/generate_container_sbom.sh "geointel-ci:$RELEASE_SHA-ai"
|
||||||
|
- name: Enforce AI container vulnerability policy
|
||||||
|
env:
|
||||||
|
RELEASE_SHA: ${{ gitea.sha }}
|
||||||
|
run: bash scripts/scan_container_image.sh "geointel-ci:$RELEASE_SHA-ai"
|
||||||
|
- name: Publish AI container evidence
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||||
|
with:
|
||||||
|
name: container-ai-evidence
|
||||||
|
path: |
|
||||||
|
artifacts/image-inspect-ai.json
|
||||||
artifacts/geointel-sbom.spdx.json
|
artifacts/geointel-sbom.spdx.json
|
||||||
artifacts/geointel-container-vulnerabilities.json
|
artifacts/geointel-container-vulnerabilities.json
|
||||||
if-no-files-found: warn
|
if-no-files-found: warn
|
||||||
|
|||||||
Reference in New Issue
Block a user