Skip to content

Commit d67dd8a

Browse files
authored
Merge branch 'main' into chore/improve-oauth-test-coverage-for-named-user-caching
2 parents efdb253 + bd6e1f9 commit d67dd8a

File tree

230 files changed

+6432
-2886
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+6432
-2886
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ body:
4444
- Java and Maven version via `mvn --version`: ...
4545
- SAP Cloud SDK version: ...
4646
- Spring Boot or CAP version: ...
47-
- <details><summary>Dependency tree via `mvn dependency:tree`</summary>
47+
48+
<details><summary>Dependency tree via <code>mvn dependency:tree</code></summary>
4849
49-
```
50-
Dependency tree here
51-
```
52-
</details>
50+
```
51+
Dependency tree here
52+
```
53+
</details>
5354
validations:
5455
required: true
5556
- type: textarea

.github/actions/workflow-succeeded/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ runs:
5454
run: |
5555
JOBS_JSON=$(gh run view "${{ steps.find-run-id.outputs.RUN_ID }}" --json jobs)
5656
NON_SUCCESSFUL_JOBS=$(jq -r '.jobs[] | select(.conclusion != "success" and .conclusion != "neutral")' <<< "$JOBS_JSON")
57-
EXCLUDED_JOBS=$(jq -r '.[]' <<< "${{ inputs.excluded-jobs }}")
57+
EXCLUDED_JOBS=$(jq -r '.[]' <<< '${{ inputs.excluded-jobs }}')
5858
while IFS= read -r EXCLUDED_JOB; do
5959
if [[ -z "$EXCLUDED_JOB" ]]; then
6060
continue

.github/dependabot.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ updates:
3636
- dependency-name: 'com.github.ekryd.sortpom:sortpom-maven-plugin'
3737
# used by deprecated code only, not worth updating for now
3838
- dependency-name: 'org.apache.axis2:*'
39+
# Ignore problematic license versions
40+
- dependency-name: 'com.sap.cloud.security:java-security'
41+
versions: ['3.6.1', '3.6.2']
42+
- dependency-name: 'com.sap.cloud.security.xsuaa:token-client'
43+
versions: ['3.6.1', '3.6.2']
44+
- dependency-name: 'com.sap.cloud.security:java-api'
45+
versions: ['3.6.1', '3.6.2']
46+
- dependency-name: 'com.sap.cloud.security:env'
47+
versions: ['3.6.1', '3.6.2']
3948

4049
# archetype updates
4150
# Dependabot seems to be unable to handle those, so this is disabled for now

.github/workflows/blackduck.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
timeout-minutes: 15
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515
- name: "Scan With Black Duck"
1616
uses: ./.github/actions/scan-with-blackduck
1717
with:
@@ -23,7 +23,7 @@ jobs:
2323
if: ${{ failure() && github.ref == 'refs/heads/main' }}
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@v5
2727
- name: Notify
2828
run: python .pipeline/scripts/notify.py
2929
env:

.github/workflows/cache-maven-dependencies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: "Checkout"
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v5
1919
with:
2020
ref: ${{ env.MAVEN_CACHE_REF }}
2121

.github/workflows/continuous-integration.yaml

Lines changed: 20 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: "Continuous Integration"
22
on:
33
pull_request:
4+
branches: [ "*" ]
5+
push:
46
branches: [ "main" ]
57

68
workflow_dispatch:
@@ -32,7 +34,6 @@ on:
3234

3335
env:
3436
M2_ROOT: ~/.m2/repository
35-
RELEASE_ARTIFACT_NAME: "release-artifacts"
3637
SDK_M2_NAME: "sdk-m2" # used for the installed SDK modules within the runner's maven repository
3738
SDK_M2_PATH: |
3839
~/.m2/repository/com/sap/cloud/sdk/**
@@ -67,7 +68,11 @@ jobs:
6768
echo "COMMIT=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
6869
exit 0
6970
fi
70-
echo "Unable to determine commit SHA as the workflow was not triggered by a pull request and the commit input was not provided"
71+
if [[ "${{ github.event_name }}" == "push" ]]; then
72+
echo "COMMIT=${{ github.sha }}" >> $GITHUB_OUTPUT
73+
exit 0
74+
fi
75+
echo "Unable to determine commit SHA as the workflow was not triggered by a pull request or push, and the commit input was not provided"
7176
exit 1
7277
7378
check-formatting:
@@ -76,7 +81,7 @@ jobs:
7681
runs-on: ubuntu-latest
7782
steps:
7883
- name: "Checkout Repository"
79-
uses: actions/checkout@v4
84+
uses: actions/checkout@v5
8085
with:
8186
ref: ${{ needs.context.outputs.commit }}
8287

@@ -103,7 +108,7 @@ jobs:
103108
runs-on: ubuntu-latest
104109
steps:
105110
- name: "Checkout repository"
106-
uses: actions/checkout@v4
111+
uses: actions/checkout@v5
107112
with:
108113
ref: ${{ needs.context.outputs.commit }}
109114

@@ -122,38 +127,9 @@ jobs:
122127

123128
- name: "Build SDK"
124129
run: |
125-
MVN_ARGS="${{ env.MVN_MULTI_THREADED_ARGS }} install -DskipTests -DskipFormatting"
126-
127-
if [[ "${{ github.event.inputs.build-release-artifacts }}" == "true" ]]; then
128-
echo "[DEBUG] Building release artifacts"
129-
python .pipeline/scripts/generate-javadoc-sourcepath-properties.py
130-
MVN_ARGS="$MVN_ARGS javadoc:aggregate -Pdocs"
131-
fi
132-
130+
MVN_ARGS="${{ env.MVN_MULTI_THREADED_ARGS }} clean install -DskipTests -DskipFormatting"
133131
echo "[DEBUG] Running Maven with following arguments: $MVN_ARGS"
134132
mvn $MVN_ARGS
135-
136-
if [[ "${{ github.event.inputs.build-release-artifacts }}" == "true" ]]; then
137-
VERSION=$(cat latest.json | jq -r .version)
138-
mkdir -p $HOME/.sdk-release
139-
140-
PYTHON_ARGS="--version $VERSION --path-prefix $HOME/.sdk-release/${{ env.RELEASE_ARTIFACT_NAME }}"
141-
if [[ "${{ github.event.inputs.sign-release-artifacts }}" == "true" ]]; then
142-
echo "[DEBUG] Signing release artifacts"
143-
PYTHON_ARGS="$PYTHON_ARGS --with-signing"
144-
fi
145-
146-
python .pipeline/scripts/generate-release-artifacts.py $PYTHON_ARGS
147-
else
148-
echo "[DEBUG] Skipping release artifact generation"
149-
fi
150-
151-
- name: "Build Module Inventory"
152-
run: >
153-
python ./scripts/create_module_inventory_file.py
154-
--sdk-root-directory ./
155-
--output-file ./module-inventory.json
156-
--script-config ./scripts/common/_maven_module/maven_module_reader_configuration.json
157133
158134
- name: "Verify Local Changes"
159135
run: |
@@ -166,14 +142,6 @@ jobs:
166142
exit 1
167143
fi
168144
169-
- name: "Upload Release Artifacts"
170-
if: ${{ github.event.inputs.build-release-artifacts == 'true' }}
171-
uses: actions/upload-artifact@v4
172-
with:
173-
name: ${{ env.RELEASE_ARTIFACT_NAME }}
174-
path: ~/.sdk-release/${{ env.RELEASE_ARTIFACT_NAME }}
175-
retention-days: 1
176-
177145
- name: "Upload SDK M2"
178146
uses: actions/upload-artifact@v4
179147
with:
@@ -194,7 +162,7 @@ jobs:
194162
runs-on: ubuntu-latest
195163
steps:
196164
- name: "Checkout repository"
197-
uses: actions/checkout@v4
165+
uses: actions/checkout@v5
198166
with:
199167
ref: ${{ needs.context.outputs.commit }}
200168

@@ -212,13 +180,13 @@ jobs:
212180
path: ${{ env.M2_ROOT }}
213181

214182
- name: "Restore SDK M2"
215-
uses: actions/download-artifact@v4
183+
uses: actions/download-artifact@v5
216184
with:
217185
name: ${{ env.SDK_M2_NAME }}
218186
path: ${{ env.M2_ROOT }}
219187

220188
- name: "Restore SDK Targets"
221-
uses: actions/download-artifact@v4
189+
uses: actions/download-artifact@v5
222190
with:
223191
name: ${{ env.SDK_TARGETS_NAME }}
224192

@@ -255,7 +223,7 @@ jobs:
255223
name: "Run ${{ matrix.task.name }} Analysis"
256224
steps:
257225
- name: "Checkout repository"
258-
uses: actions/checkout@v4
226+
uses: actions/checkout@v5
259227
with:
260228
ref: ${{ needs.context.outputs.commit }}
261229

@@ -273,13 +241,13 @@ jobs:
273241
path: ${{ env.M2_ROOT }}
274242

275243
- name: "Restore SDK M2"
276-
uses: actions/download-artifact@v4
244+
uses: actions/download-artifact@v5
277245
with:
278246
name: ${{ env.SDK_M2_NAME }}
279247
path: ${{ env.M2_ROOT }}
280248

281249
- name: "Restore SDK Targets"
282-
uses: actions/download-artifact@v4
250+
uses: actions/download-artifact@v5
283251
with:
284252
name: ${{ env.SDK_TARGETS_NAME }}
285253

@@ -296,7 +264,7 @@ jobs:
296264
runs-on: ubuntu-latest
297265
steps:
298266
- name: "Checkout repository"
299-
uses: actions/checkout@v4
267+
uses: actions/checkout@v5
300268
with:
301269
ref: ${{ needs.context.outputs.commit }}
302270

@@ -357,7 +325,7 @@ jobs:
357325
path: ${{ env.MAVEN_CACHE_DIR }}
358326

359327
- name: "Restore SDK M2"
360-
uses: actions/download-artifact@v4
328+
uses: actions/download-artifact@v5
361329
with:
362330
name: ${{ env.SDK_M2_NAME }}
363331
path: ${{ env.M2_ROOT }}
@@ -430,7 +398,7 @@ jobs:
430398
runs-on: ubuntu-latest
431399
steps:
432400
- name: "Checkout repository"
433-
uses: actions/checkout@v4
401+
uses: actions/checkout@v5
434402
with:
435403
ref: ${{ needs.context.outputs.commit }}
436404

@@ -446,7 +414,7 @@ jobs:
446414
runs-on: ubuntu-latest
447415
steps:
448416
- name: "Checkout repository"
449-
uses: actions/checkout@v4
417+
uses: actions/checkout@v5
450418
with:
451419
ref: ${{ needs.context.outputs.commit }}
452420

.github/workflows/dependabot-automerge.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
contents: write
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v5
2323

2424
- name: Approve and Merge PRs
2525
run: |
Lines changed: 26 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,39 @@
1-
name: Deploy Snapshot to Maven Central
1+
name: Deploy Snapshot to SAP Common Artifactory
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
skip_blackduck_scan:
7-
description: "Skip Blackduck Scan"
8-
type: boolean
9-
default: false
10-
required: false
11-
12-
env:
13-
CI_BUILD_WORKFLOW: "continuous-integration.yaml" # Name of the workflow that should be triggered for CI builds
14-
RELEASE_ARTIFACT_NAME: "release-artifacts" # Name of the artifact that should be downloaded from the CI build workflow
15-
16-
MVN_CLI_ARGS: "--batch-mode --no-transfer-progress --fail-at-end --show-version"
5+
schedule:
6+
- cron: 0 20 * * 1-5
177

188
jobs:
19-
run-ci:
20-
name: "Continuous Integration"
21-
runs-on: ubuntu-latest
22-
outputs:
23-
ci-run-id: ${{ steps.trigger-ci.outputs.run-id }}
24-
permissions:
25-
actions: write # needed to trigger the ci-build workflow
26-
statuses: write # needed to update the commit status
27-
steps:
28-
- name: "Checkout repository"
29-
uses: actions/checkout@v4
30-
- name: "Get Commit SHA"
31-
run: echo "COMMIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
32-
- name: "Get Branch Name"
33-
run: echo "BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
34-
35-
- name: "Trigger CI Workflow"
36-
id: trigger-ci
37-
uses: ./.github/actions/trigger-workflow
38-
with:
39-
workflow: ${{ env.CI_BUILD_WORKFLOW }}
40-
workflow-ref: ${{ env.BRANCH_NAME }}
41-
commit-sha: ${{ env.COMMIT_SHA }}
42-
parameters: >
43-
-f commit=${{ env.COMMIT_SHA }}
44-
-f build-release-artifacts=true
45-
-f run-blackduck-scan=${{ !github.event.inputs.skip_blackduck_scan }}
46-
47-
- name: "Await CI Workflow"
48-
uses: ./.github/actions/await-workflow
49-
with:
50-
run-id: ${{ steps.trigger-ci.outputs.run-id }}
51-
commit-status: "Continuous Integration Workflow"
52-
539
deploy-snapshot:
5410
name: Deploy Snapshot
55-
needs: [ run-ci ]
5611
runs-on: ubuntu-latest
57-
timeout-minutes: 15
58-
permissions:
59-
actions: read # needed to download the artifacts from the ci-build workflow
6012
steps:
6113
- name: "Checkout Repository"
62-
uses: actions/checkout@v4
14+
uses: actions/checkout@v5
6315

64-
- name: "Deploy Snapshot"
65-
uses: ./.github/actions/deploy-snapshot
16+
- name: "Setup java"
17+
uses: actions/setup-java@v4
6618
with:
67-
ci-run-id: ${{ needs.run-ci.outputs.ci-run-id }}
68-
repository-url: "https://oss.sonatype.org/content/repositories/snapshots"
69-
repository-username: ${{ secrets.MAVEN_CENTRAL_USER }}
70-
repository-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
71-
release-artifact-name: ${{ env.RELEASE_ARTIFACT_NAME }}
72-
73-
notify-job:
74-
runs-on: ubuntu-latest
75-
needs: [ run-ci, deploy-snapshot ]
76-
if: ${{ failure() && github.ref == 'refs/heads/main' }}
77-
steps:
78-
- name: "Checkout"
79-
uses: actions/checkout@v4
80-
- name: "Notify"
81-
run: python .pipeline/scripts/notify.py
19+
distribution: "sapmachine"
20+
java-version: "17"
21+
server-id: artifactory-snapshots
22+
server-username: DEPLOYMENT_USER
23+
server-password: DEPLOYMENT_PASS
24+
25+
- name: "Publish Snapshot"
26+
run: >
27+
mvn
28+
--batch-mode
29+
--no-transfer-progress
30+
--threads 1C
31+
--show-version
32+
-DrepositoryId=artifactory-snapshots
33+
-Dmaven.compiler.showCompilationChanges
34+
-Dhttp.keepAlive=false
35+
clean package deploy
8236
env:
83-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
84-
WORKFLOW: ${{ github.workflow }}
85-
WORKFLOW_RUN_URL: https://github.com/SAP/cloud-sdk-java/actions/runs/${{ github.run_id }}
86-
BRANCH_NAME: ${{ github.ref_name }}
37+
DEPLOYMENT_USER: ${{ secrets.ARTIFACTORY_COMMON_USER }}
38+
DEPLOYMENT_PASS: ${{ secrets.ARTIFACTORY_COMMON_PASSWORD }}
39+

.github/workflows/fosstars-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
name: "Security rating"
1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v5
1313
- uses: SAP/fosstars-rating-core-action@v1.14.0
1414
with:
1515
report-branch: fosstars-report

0 commit comments

Comments
 (0)