Skip to content

Commit 5456771

Browse files
authored
Merge branch 'main' into transparentProxyBuilder
2 parents 121f01f + a1120bf commit 5456771

File tree

168 files changed

+4532
-2185
lines changed

Some content is hidden

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

168 files changed

+4532
-2185
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/workflows/continuous-integration.yaml

Lines changed: 8 additions & 40 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:
@@ -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:
Lines changed: 25 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,40 @@
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
5712
timeout-minutes: 15
58-
permissions:
59-
actions: read # needed to download the artifacts from the ci-build workflow
6013
steps:
6114
- name: "Checkout Repository"
6215
uses: actions/checkout@v4
6316

64-
- name: "Deploy Snapshot"
65-
uses: ./.github/actions/deploy-snapshot
17+
- name: "Setup java"
18+
uses: actions/setup-java@v4
6619
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
20+
distribution: "sapmachine"
21+
java-version: "17"
22+
server-id: artifactory-snapshots
23+
server-username: DEPLOYMENT_USER
24+
server-password: DEPLOYMENT_PASS
25+
26+
- name: "Publish Snapshot"
27+
run: >
28+
mvn
29+
--batch-mode
30+
--no-transfer-progress
31+
--threads 1C
32+
--show-version
33+
-DrepositoryId=artifactory-snapshots
34+
-Dmaven.compiler.showCompilationChanges
35+
-Dhttp.keepAlive=false
36+
clean package deploy
8237
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 }}
38+
DEPLOYMENT_USER: ${{ secrets.ARTIFACTORY_COMMON_USER }}
39+
DEPLOYMENT_PASS: ${{ secrets.ARTIFACTORY_COMMON_PASSWORD }}
40+

.github/workflows/main-build.yaml

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)