Skip to content

Commit 0206eab

Browse files
Merge branch 'master' into release-4-5-c
2 parents 55ab5af + 472d925 commit 0206eab

26 files changed

+1572
-854
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Build with cached CVEs"
2+
inputs:
3+
gh-token:
4+
description: "GitHub Token for authentication"
5+
required: true
6+
7+
runs:
8+
using: "composite"
9+
steps:
10+
- name: Install jq (JSON processor) if not found
11+
run: |
12+
if ! command -v jq &> /dev/null; then
13+
sudo apt-get update
14+
sudo apt-get install -y jq
15+
else
16+
echo "jq is already installed. Skipping install..."
17+
fi
18+
shell: bash
19+
20+
- name: Download CVE Data
21+
run: |
22+
# Find the latest CVE upload workflow.
23+
run_id=$(gh run list --workflow="post_release.yaml" --limit 1 --status=success --json databaseId | jq -r '.[0].databaseId')
24+
echo 'Fetching artifacts from run $run_id'
25+
# Remove any downloaded artifacts, should they exist.
26+
rm -rf ./downloaded_artifacts
27+
# Download the latest artifact to a new dir.
28+
gh run download ${run_id} --name security-bulletins --dir ./downloaded_artifacts
29+
shell: bash
30+
env:
31+
GH_TOKEN: ${{ inputs.gh-token }}
32+
33+
- name: Unpack CVE data
34+
run: |
35+
# Ensure the correct folders exist.
36+
mkdir -p .docusaurus/security-bulletins/default
37+
# Move the files to their correct places in the checked out repository
38+
mv downloaded_artifacts/data.json .docusaurus/security-bulletins/default/data.json
39+
rm -rf downloaded_artifacts
40+
shell: bash
41+
42+
- name: Build
43+
run: |
44+
rm -rf build
45+
npm run build
46+
shell: bash

.github/actions/build-cached-packs/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020
- name: Download Packs Data
2121
run: |
2222
# Find the latest packs upload workflow.
23-
run_id=$(gh run list --workflow="post_release.yaml" --limit 1 --json databaseId | jq -r '.[0].databaseId')
23+
run_id=$(gh run list --workflow="post_release.yaml" --limit 1 --status=success --json databaseId | jq -r '.[0].databaseId')
2424
# Remove any downloaded artifacts, should they exist.
2525
rm -rf ./downloaded_artifacts
2626
# Download the latest artifact to a new dir.

.github/workflows/dependabot.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,9 @@ jobs:
5353
uses: ./.github/actions/build-cached-packs
5454
with:
5555
gh-token: ${{ secrets.GITHUB_TOKEN }}
56+
57+
- name: Build with cached CVEs
58+
if: ${{ env.BUILD_EXIT_CODE == '7' }}
59+
uses: ./.github/actions/build-cached-cves
60+
with:
61+
gh-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/nightly-docker-build.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ jobs:
4242
uses: ./.github/actions/build-cached-packs
4343
with:
4444
gh-token: ${{ secrets.GITHUB_TOKEN }}
45+
46+
- name: Build with cached CVEs
47+
if: ${{ env.BUILD_EXIT_CODE == '7' }}
48+
uses: ./.github/actions/build-cached-cves
49+
with:
50+
gh-token: ${{ secrets.GITHUB_TOKEN }}
4551

4652
- name: Set up QEMU
4753
uses: docker/setup-qemu-action@v3

.github/workflows/post_release.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ jobs:
5050
with:
5151
gh-token: ${{ secrets.GITHUB_TOKEN }}
5252

53+
- name: Build with cached CVEs
54+
if: ${{ env.BUILD_EXIT_CODE == '7' }}
55+
uses: ./.github/actions/build-cached-cves
56+
with:
57+
gh-token: ${{ secrets.GITHUB_TOKEN }}
58+
5359
- name: Upload Build Packs
5460
uses: actions/upload-artifact@v4
5561
with:
@@ -59,3 +65,11 @@ jobs:
5965
.docusaurus/packs-integrations
6066
if-no-files-found: error
6167
retention-days: 7
68+
69+
- name: Upload Built Security Bulletins
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: "security-bulletins"
73+
path: .docusaurus/security-bulletins/default/data.json
74+
if-no-files-found: error
75+
retention-days: 7

.github/workflows/pull_request.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ env:
2323
PALETTE_API_KEY: ${{ secrets.PALETTE_API_KEY }}
2424
DISABLE_PACKS_INTEGRATIONS: ${{ secrets.DISABLE_PACKS_INTEGRATIONS }}
2525
DISABLE_SECURITY_INTEGRATIONS: ${{ secrets.DISABLE_SECURITY_INTEGRATIONS }}
26-
DSO_AUTH_TOKEN: ${{ secrets.DSO_AUTH_TOKEN }}
26+
DSO_AUTH_TOKEN: ${{ secrets.DSO_AUTH_TOKEN }}
2727

2828
jobs:
2929
run-ci:
@@ -104,5 +104,11 @@ jobs:
104104
- name: Build with cached packs
105105
if: ${{ env.BUILD_EXIT_CODE == '5' }}
106106
uses: ./.github/actions/build-cached-packs
107+
with:
108+
gh-token: ${{ secrets.GITHUB_TOKEN }}
109+
110+
- name: Build with cached CVEs
111+
if: ${{ env.BUILD_EXIT_CODE == '7' }}
112+
uses: ./.github/actions/build-cached-cves
107113
with:
108114
gh-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-branch-pr.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,9 @@ jobs:
7373
uses: ./.github/actions/build-cached-packs
7474
with:
7575
gh-token: ${{ secrets.GITHUB_TOKEN }}
76+
77+
- name: Build with cached CVEs
78+
if: ${{ env.BUILD_EXIT_CODE == '7' }}
79+
uses: ./.github/actions/build-cached-cves
80+
with:
81+
gh-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-preview.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ jobs:
7070
with:
7171
gh-token: ${{ secrets.GITHUB_TOKEN }}
7272

73+
- name: Build with cached CVEs
74+
if: ${{ env.BUILD_EXIT_CODE == '7' }}
75+
uses: ./.github/actions/build-cached-cves
76+
with:
77+
gh-token: ${{ secrets.GITHUB_TOKEN }}
78+
7379
- name: Deploy Preview
7480
run: |
7581
aws s3 sync --cache-control 'public, max-age=604800' --exclude '*.html' --exclude build/scripts/ build/ s3://docs-latest.spectrocloud.com --delete

.github/workflows/release.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ jobs:
7474
with:
7575
gh-token: ${{ secrets.GITHUB_TOKEN }}
7676

77+
- name: Build with cached CVEs
78+
if: ${{ env.BUILD_EXIT_CODE == '7' }}
79+
uses: ./.github/actions/build-cached-cves
80+
with:
81+
gh-token: ${{ secrets.GITHUB_TOKEN }}
82+
7783
- name: Upload to AWS
7884
run: |
7985
echo "CURRENT_STEP=Upload to AWS" >> $GITHUB_ENV

.github/workflows/screenshot_capture.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ jobs:
5757
with:
5858
gh-token: ${{ secrets.GITHUB_TOKEN }}
5959

60+
- name: Build with cached CVEs
61+
if: ${{ env.BUILD_EXIT_CODE == '7' }}
62+
uses: ./.github/actions/build-cached-cves
63+
with:
64+
gh-token: ${{ secrets.GITHUB_TOKEN }}
65+
6066
- name: Upload Build
6167
uses: actions/upload-artifact@v4
6268
with:

0 commit comments

Comments
 (0)