Skip to content

Commit 958392e

Browse files
committed
Revert test
1 parent 1b379f7 commit 958392e

File tree

2 files changed

+83
-6
lines changed

2 files changed

+83
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
- name: Download Linux ARM64 binary
3939
run: |
40-
curl -L "https://github.com/mongodb/mongodb-atlas-cli/releases/download/atlascli%2Fv${{ inputs.release_version || '1.42.2' }}/mongodb-atlas-cli_${{ inputs.release_version || '1.42.2' }}_linux_arm64.tar.gz" \
40+
curl -L "https://github.com/mongodb/mongodb-atlas-cli/releases/download/atlascli%2Fv${{ inputs.release_version }}/mongodb-atlas-cli_${{ inputs.release_version }}_linux_arm64.tar.gz" \
4141
-o release.tar.gz
4242
4343
- name: Extract binary
@@ -46,7 +46,7 @@ jobs:
4646
4747
- name: Generate PURLs from binary
4848
run: |
49-
go version -m ./mongodb-atlas-cli_${{ inputs.release_version || '1.42.2' }}_linux_arm64/bin/atlas | \
49+
go version -m ./mongodb-atlas-cli_${{ inputs.release_version }}_linux_arm64/bin/atlas | \
5050
awk '$1 == "dep" || $1 == "=>" { print "pkg:golang/" $2 "@" $3 }' | \
5151
LC_ALL=C sort > purls.txt
5252
cat purls.txt
@@ -82,12 +82,12 @@ jobs:
8282
--sbom-in "/pwd/sbom_lite.json" \
8383
--repo "${KONDUKTO_REPO}" \
8484
--branch "${KONDUKTO_BRANCH_PREFIX}-linux-arm64" \
85-
--sbom-out "/pwd/linux-amd64-augmented-sbom-v${{ inputs.release_version || '1.42.2' }}-${{ env.date }}.json"
85+
--sbom-out "/pwd/linux-amd64-augmented-sbom-v${{ inputs.release_version }}-${{ env.date }}.json"
8686
8787
- name: Generate SSDLC report
8888
env:
8989
AUTHOR: ${{ github.actor }}
90-
VERSION: ${{ inputs.release_version || '1.42.2' }}
90+
VERSION: ${{ inputs.release_version }}
9191
AUGMENTED_REPORT: "true"
9292
run: ./build/package/gen-ssdlc-report.sh
9393

@@ -96,6 +96,6 @@ jobs:
9696
with:
9797
name: augmented_sbom_and_ssdlc_report
9898
path: |
99-
linux-amd64-augmented-sbom-v${{ inputs.release_version || '1.42.2' }}-${{ env.date }}.json
100-
ssdlc-compliance-${{ inputs.release_version || '1.42.2' }}-${{ env.date }}.md
99+
linux-amd64-augmented-sbom-v${{ inputs.release_version }}-${{ env.date }}.json
100+
ssdlc-compliance-${{ inputs.release_version }}-${{ env.date }}.md
101101
if-no-files-found: error

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

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

0 commit comments

Comments
 (0)