Skip to content

Commit 8ceb9f1

Browse files
committed
improve file name and test old workfow
1 parent de75701 commit 8ceb9f1

File tree

3 files changed

+15
-83
lines changed

3 files changed

+15
-83
lines changed

.github/workflows/generate-augmented-sbom.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Augment SBOM
22

33
on:
4+
pull_request:
45
workflow_dispatch:
56
inputs:
67
release_version:
@@ -77,17 +78,23 @@ jobs:
7778
--branch "${KONDUKTO_BRANCH_PREFIX}-linux-arm64" \
7879
--sbom-out "/pwd/linux_amd64_augmented_sbom_v${{ inputs.release_version }}.json"
7980
81+
- name: Get current date
82+
id: date
83+
run: |
84+
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
85+
8086
- name: Generate SSDLC report
8187
env:
8288
AUTHOR: ${{ github.actor }}
8389
VERSION: ${{ inputs.release_version }}
8490
AUGMENTED_SBOM_TEXT: " - See Augmented SBOM manifests (CycloneDX in JSON format):
85-
\n - This file has been provided along with this report under the name 'linux_amd64_augmented_sbom_v${{ inputs.release_version }}.json'\n"
91+
\n - This file has been provided along with this report under the name 'linux_amd64_augmented_sbom_v${{ inputs.release_version }}.json'
92+
\n - Please note that this file was generated on ${{ env.date }} and may not reflect the latest security information of all third party dependencies."
8693
run: ./build/package/gen-ssdlc-report.sh
8794
- name: Upload augmented SBOM as artifact
8895
uses: actions/upload-artifact@v4
8996
with:
9097
name: augmented_sbom_and_ssdlc_report
9198
path: |
92-
linux_amd64_augmented_sbom_v${{ inputs.release_version }}.json
93-
ssdlc-compliance-${{ inputs.release_version }}.md
99+
linux-amd64-augmented-sbom-v${{ inputs.release_version }}-${{ env.date }}.json
100+
ssdlc-compliance-${{ inputs.release_version }}-${{ env.date }}.md

.github/workflows/update-ssdlc-report.yaml

Lines changed: 1 addition & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -39,80 +39,4 @@ jobs:
3939
AUTHOR: ${{ steps.extract.outputs.author }}
4040
VERSION: ${{ steps.extract.outputs.version }}
4141
run: ./build/package/gen-ssdlc-report.sh
42-
- name: set Apix Bot token
43-
id: app-token
44-
uses: mongodb/apix-action/token@3024080388613583e3bd119bfb1ab4b4dbf43c42
45-
with:
46-
app-id: ${{ secrets.APIXBOT_APP_ID }}
47-
private-key: ${{ secrets.APIXBOT_APP_PEM }}
48-
- name: Find JIRA ticket
49-
id: find
50-
uses: mongodb/apix-action/find-jira@3024080388613583e3bd119bfb1ab4b4dbf43c42
51-
with:
52-
token: ${{ secrets.JIRA_API_TOKEN }}
53-
jql: project = CLOUDP AND status NOT IN (Closed, Resolved) AND summary ~ "Update Compliance Report"
54-
- name: Set JIRA ticket (find)
55-
if: steps.find.outputs.found == 'true'
56-
run: |
57-
echo "JIRA_KEY=${{steps.find.outputs.issue-key}}" >> "$GITHUB_ENV"
58-
- name: Create JIRA ticket
59-
uses: mongodb/apix-action/create-jira@3024080388613583e3bd119bfb1ab4b4dbf43c42
60-
id: create
61-
if: steps.find.outputs.found == 'false'
62-
with:
63-
token: ${{ secrets.JIRA_API_TOKEN }}
64-
project-key: CLOUDP
65-
summary: "[AtlasCLI] Update Compliance Report"
66-
issuetype: Story
67-
description: Update Compliance Report
68-
components: AtlasCLI
69-
assignee: ${{ secrets.ASSIGNEE_JIRA_TICKET }}
70-
extra-data: |
71-
{
72-
"fields": {
73-
"fixVersions": [
74-
{
75-
"id": "41805"
76-
}
77-
],
78-
"customfield_12751": [
79-
{
80-
"id": "22223"
81-
}
82-
],
83-
"customfield_10257": {
84-
"id": "11861"
85-
}
86-
}
87-
}
88-
- name: Set JIRA ticket (create)
89-
if: steps.find.outputs.found == 'false'
90-
run: |
91-
echo "JIRA_KEY=${{steps.create.outputs.issue-key}}" >> "$GITHUB_ENV"
92-
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
93-
id: pr
94-
with:
95-
token: ${{ steps.app-token.outputs.token }}
96-
committer: "${{ steps.app-token.outputs.user-name }} <${{ steps.app-token.outputs.user-email }}>"
97-
author: "${{ steps.app-token.outputs.user-name }} <${{ steps.app-token.outputs.user-email }}>"
98-
title: "${{ env.JIRA_KEY }}: Update compliance report for v${{ steps.extract.outputs.version }}"
99-
commit-message: "${{ env.JIRA_KEY }}: Update compliance report for v${{ steps.extract.outputs.version }}"
100-
delete-branch: true
101-
base: master
102-
branch: ${{ env.JIRA_KEY }}
103-
labels: |
104-
compliance
105-
auto
106-
auto_close_jira
107-
body: |
108-
## Proposed changes
109-
Update compliance report for v${{ steps.extract.outputs.version }}
110-
_Jira ticket:_ ${{ env.JIRA_KEY }}
111-
112-
Note: Jira ticket will be closed automatically when this PR is merged.
113-
114-
- name: Set auto merge
115-
env:
116-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
117-
run: |
118-
gh pr merge "${{ steps.pr.outputs.pull-request-url }}" --auto --squash
42+

build/package/gen-ssdlc-report.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,22 @@ export AUTHOR
3333
export VERSION
3434

3535
target_dir="."
36+
file_name="ssdlc-compliance-${VERSION}.md"
3637

3738
if [ -z "${AUGMENTED_SBOM_TEXT:-}" ]; then
3839
target_dir="compliance/v${VERSION}"
39-
40+
file_name="ssdlc-compliance-${VERSION}-${DATE}.md"
4041
# Ensure AtlasCLI version directory exists
4142
mkdir -p "${target_dir}"
4243
fi
4344

4445
echo "Generating SSDLC checklist for AtlasCLI version ${VERSION}, author ${AUTHOR} and release date ${DATE}..."
4546

4647
envsubst < docs/releases/ssdlc-compliance.template.md \
47-
> "${target_dir}/ssdlc-compliance-${VERSION}.md"
48+
> "${target_dir}/${file_name}"
4849

4950
echo "SDLC checklist ready. Files in ${target_dir}/:"
5051
ls -l "${target_dir}/"
5152

5253
echo "Printing the generated report:"
53-
cat "${target_dir}/ssdlc-compliance-${VERSION}.md"
54+
cat "${target_dir}/${file_name}"

0 commit comments

Comments
 (0)