Skip to content

Commit 6dd2eed

Browse files
authored
[BRE-831] Removing backward compatibility for SPs (#420)
1 parent e651ae8 commit 6dd2eed

File tree

4 files changed

+6
-184
lines changed

4 files changed

+6
-184
lines changed

.github/workflows/test-report-deployment-status-to-slack.yml

Lines changed: 0 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -145,121 +145,3 @@ jobs:
145145
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
146146
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
147147
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
148-
149-
test-report-start-backwards-compatibility:
150-
name: Test Slack report (Backwards Compatibility)
151-
runs-on: ubuntu-22.04
152-
permissions:
153-
contents: read
154-
steps:
155-
- name: Checkout
156-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
157-
158-
- name: Start
159-
uses: ./report-deployment-status-to-slack
160-
with:
161-
project: $TEST_REPORT_PROJECT
162-
environment: EU-QA Cloud
163-
slack-channel: bre-alerts-test
164-
tag: test-workflow-start
165-
event: 'start'
166-
commit-sha: $TEST_REPORT_COMMIT_SHA
167-
url: https://github.com/bitwarden/gh-actions/actions/runs/${{ github.run_id }}
168-
AZURE_KV_CI_SERVICE_PRINCIPAL: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
169-
170-
- name: Success
171-
uses: ./report-deployment-status-to-slack
172-
with:
173-
project: $TEST_REPORT_PROJECT
174-
environment: US-QA Cloud
175-
slack-channel: bre-alerts-test
176-
tag: test-workflow-success
177-
event: 'success'
178-
commit-sha: $TEST_REPORT_COMMIT_SHA
179-
url: https://github.com/bitwarden/gh-actions/actions/runs/${{ github.run_id }}
180-
AZURE_KV_CI_SERVICE_PRINCIPAL: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
181-
182-
- name: Failure
183-
uses: ./report-deployment-status-to-slack
184-
with:
185-
project: $TEST_REPORT_PROJECT
186-
environment: US-QA Cloud
187-
slack-channel: bre-alerts-test
188-
tag: test-workflow-failure
189-
event: 'failure'
190-
commit-sha: $TEST_REPORT_COMMIT_SHA
191-
url: https://github.com/bitwarden/gh-actions/actions/runs/${{ github.run_id }}
192-
AZURE_KV_CI_SERVICE_PRINCIPAL: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
193-
194-
- name: No Changes
195-
uses: ./report-deployment-status-to-slack
196-
with:
197-
project: $TEST_REPORT_PROJECT
198-
environment: EU-QA Cloud
199-
slack-channel: bre-alerts-test
200-
tag: test-workflow-failure
201-
event: 'no-changes'
202-
commit-sha: $TEST_REPORT_COMMIT_SHA
203-
url: https://github.com/bitwarden/gh-actions/actions/runs/${{ github.run_id }}
204-
AZURE_KV_CI_SERVICE_PRINCIPAL: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
205-
206-
test-report-db-migration-backwards-compatibility:
207-
name: Test Slack report with different DB migration scenerios (Backwards Compatibility)
208-
runs-on: ubuntu-22.04
209-
permissions:
210-
contents: read
211-
steps:
212-
- name: Checkout
213-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
214-
215-
- name: With DB migration true on main
216-
uses: ./report-deployment-status-to-slack
217-
with:
218-
project: $TEST_REPORT_PROJECT
219-
environment: EU-QA Cloud
220-
slack-channel: bre-alerts-test
221-
tag: main
222-
event: 'success'
223-
commit-sha: $TEST_REPORT_COMMIT_SHA
224-
db_migration_detected: true
225-
url: https://github.com/bitwarden/gh-actions/actions/runs/${{ github.run_id }}
226-
AZURE_KV_CI_SERVICE_PRINCIPAL: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
227-
228-
- name: With DB migration false on main
229-
uses: ./report-deployment-status-to-slack
230-
with:
231-
project: $TEST_REPORT_PROJECT
232-
environment: US-QA Cloud
233-
slack-channel: bre-alerts-test
234-
tag: main
235-
event: 'failure'
236-
commit-sha: $TEST_REPORT_COMMIT_SHA
237-
db_migration_detected: false
238-
url: https://github.com/bitwarden/gh-actions/actions/runs/${{ github.run_id }}
239-
AZURE_KV_CI_SERVICE_PRINCIPAL: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
240-
241-
- name: With DB migration true on test branch
242-
uses: ./report-deployment-status-to-slack
243-
with:
244-
project: $TEST_REPORT_PROJECT
245-
environment: EU-QA Cloud
246-
slack-channel: bre-alerts-test
247-
tag: test-branch-failure
248-
event: 'failure'
249-
commit-sha: $TEST_REPORT_COMMIT_SHA
250-
db_migration_detected: false
251-
url: https://github.com/bitwarden/gh-actions/actions/runs/${{ github.run_id }}
252-
AZURE_KV_CI_SERVICE_PRINCIPAL: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
253-
254-
- name: With DB migration false on test branch
255-
uses: ./report-deployment-status-to-slack
256-
with:
257-
project: $TEST_REPORT_PROJECT
258-
environment: US-QA Cloud
259-
slack-channel: bre-alerts-test
260-
tag: test-branch-success
261-
event: 'success'
262-
commit-sha: $TEST_REPORT_COMMIT_SHA
263-
db_migration_detected: true
264-
url: https://github.com/bitwarden/gh-actions/actions/runs/${{ github.run_id }}
265-
AZURE_KV_CI_SERVICE_PRINCIPAL: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}

.github/workflows/test-report-upcoming-release-version.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,6 @@ on:
66
- ".github/workflows/test-report-upcoming-release-version.yml"
77

88
jobs:
9-
# Remove this step after all repositories are switched over to OIDC, but currently test for backwards compatibility
10-
test-report-upcoming-release-version-backward-compatibility:
11-
name: Test report upcoming release version to Slack (Backwards Compatibility)
12-
runs-on: ubuntu-22.04
13-
permissions:
14-
contents: read
15-
steps:
16-
- name: Checkout
17-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18-
19-
- name: Report upcoming release version to Slack
20-
uses: ./report-upcoming-release-version
21-
with:
22-
project: bitwarden/server
23-
version: upcoming_version_1
24-
slack-channel: bre-alerts-test
25-
AZURE_KV_CI_SERVICE_PRINCIPAL: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
26-
279
test-report-upcoming-release-version-oidc:
2810
name: Test report upcoming release version to Slack
2911
runs-on: ubuntu-22.04

report-deployment-status-to-slack/action.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,15 @@ inputs:
3434
description: "URL of the deployment action run"
3535
required: false
3636
default: ${{ github.event.deployment_status.target_url }}
37-
AZURE_KV_CI_SERVICE_PRINCIPAL:
38-
description: "The service principal used to authenticate to Azure. (Deprecated, use AZURE ID inputs instead)"
39-
required: false
40-
default: ""
4137
AZURE_SUBSCRIPTION_ID:
4238
description: "Azure Subscription ID for the service principal."
43-
required: false
44-
default: ""
39+
required: true
4540
AZURE_TENANT_ID:
4641
description: "Azure Tenant ID for the service principal."
47-
required: false
48-
default: ""
42+
required: true
4943
AZURE_CLIENT_ID:
5044
description: "Azure Client ID for the service principal."
51-
required: false
52-
default: ""
45+
required: true
5346
outputs:
5447
channel_id:
5548
description: "Channel ID where the Slack message was posted"
@@ -61,21 +54,7 @@ outputs:
6154
runs:
6255
using: "composite"
6356
steps:
64-
- name: Missing inputs check
65-
if: ${{ inputs.AZURE_KV_CI_SERVICE_PRINCIPAL == '' && inputs.AZURE_CLIENT_ID == '' }}
66-
shell: bash
67-
run: |
68-
echo "Error: Either AZURE_KV_CI_SERVICE_PRINCIPAL or AZURE_CLIENT_ID input must be provided."
69-
exit 1
70-
71-
- name: Login to Azure - Prod Subscription
72-
if: ${{ inputs.AZURE_KV_CI_SERVICE_PRINCIPAL != '' }}
73-
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
74-
with:
75-
creds: ${{ inputs.AZURE_KV_CI_SERVICE_PRINCIPAL }}
76-
7757
- name: Azure Login
78-
if: ${{ inputs.AZURE_CLIENT_ID != '' }}
7958
uses: bitwarden/gh-actions/azure-login@main
8059
with:
8160
subscription_id: ${{ inputs.AZURE_SUBSCRIPTION_ID }}

report-upcoming-release-version/action.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,15 @@ inputs:
1010
slack-channel:
1111
description: "The name of the Slack channel."
1212
default: release
13-
AZURE_KV_CI_SERVICE_PRINCIPAL:
14-
description: "The service principal used to authenticate to Azure. (Deprecated, use AZURE ID inputs instead)"
15-
required: false
16-
default: ""
1713
AZURE_SUBSCRIPTION_ID:
1814
description: "Azure Subscription ID for the service principal."
19-
required: false
20-
default: ""
15+
required: true
2116
AZURE_TENANT_ID:
2217
description: "Azure Tenant ID for the service principal."
23-
required: false
24-
default: ""
18+
required: true
2519
AZURE_CLIENT_ID:
2620
description: "Azure Client ID for the service principal."
27-
required: false
28-
default: ""
21+
required: true
2922
outputs:
3023
channel_id:
3124
description: "Channel ID where the Slack message was posted."
@@ -34,21 +27,7 @@ outputs:
3427
runs:
3528
using: "composite"
3629
steps:
37-
- name: Missing inputs check
38-
if: ${{ inputs.AZURE_KV_CI_SERVICE_PRINCIPAL == '' && inputs.AZURE_CLIENT_ID == '' }}
39-
shell: bash
40-
run: |
41-
echo "Error: Either AZURE_KV_CI_SERVICE_PRINCIPAL or AZURE_CLIENT_ID input must be provided."
42-
exit 1
43-
44-
- name: Login to Azure - Prod Subscription
45-
if: ${{ inputs.AZURE_KV_CI_SERVICE_PRINCIPAL != '' }}
46-
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
47-
with:
48-
creds: ${{ inputs.AZURE_KV_CI_SERVICE_PRINCIPAL }}
49-
5030
- name: Azure Login
51-
if: ${{ inputs.AZURE_CLIENT_ID != '' }}
5231
uses: bitwarden/gh-actions/azure-login@main
5332
with:
5433
subscription_id: ${{ inputs.AZURE_SUBSCRIPTION_ID }}

0 commit comments

Comments
 (0)