-
Notifications
You must be signed in to change notification settings - Fork 9
Pipeline optimization #819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8ecc577
5267143
3683cb6
302f38c
0ce2515
987838e
4767d3c
cbcc5da
d38d6fc
719bdb7
585c8aa
1e31c29
1f0efaf
ac12766
5f1c07d
e30d192
d902d32
2581bd4
c57b47d
5aee24d
e8f5b42
9b76075
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| name: Bind Cloud Foundry Services | ||
| description: Login to CF and bind services for hybrid testing via cds bind | ||
|
|
||
| inputs: | ||
| cf-api: | ||
| description: Cloud Foundry API endpoint | ||
| required: true | ||
| cf-username: | ||
| description: Cloud Foundry username | ||
| required: true | ||
| cf-password: | ||
| description: Cloud Foundry password | ||
| required: true | ||
| cf-org: | ||
| description: Cloud Foundry organization | ||
| required: true | ||
| cf-space: | ||
| description: Cloud Foundry space | ||
| required: true | ||
| auth-method: | ||
| description: 'Malware scanner authentication method: basic or mtls' | ||
| required: true | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Install CF CLI | ||
| shell: bash | ||
| run: | | ||
| wget -q "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=8.9.0&source=github-rel" -O cf-cli.tar.gz | ||
| tar -xzf cf-cli.tar.gz | ||
| sudo mv cf8 /usr/local/bin/cf | ||
|
Schmarvinius marked this conversation as resolved.
|
||
| cf --version | ||
|
|
||
| - name: CF Login | ||
| shell: bash | ||
| env: | ||
| CF_USERNAME: ${{ inputs.cf-username }} | ||
| CF_PASSWORD: ${{ inputs.cf-password }} | ||
| CF_API: ${{ inputs.cf-api }} | ||
| CF_ORG: ${{ inputs.cf-org }} | ||
| CF_SPACE: ${{ inputs.cf-space }} | ||
| run: | | ||
| for i in {1..5}; do | ||
| cf api "$CF_API" && \ | ||
| cf auth && \ | ||
| cf target -o "$CF_ORG" -s "$CF_SPACE" && break | ||
| if [ "$i" -eq 5 ]; then | ||
| echo "cf login failed after 5 attempts." | ||
| exit 1 | ||
| fi | ||
| echo "cf login failed, retrying ($i/5)..." | ||
| sleep 10 | ||
| done | ||
|
Schmarvinius marked this conversation as resolved.
|
||
|
|
||
| - name: Install @sap/cds-dk | ||
| shell: bash | ||
| run: | | ||
| npm i -g @sap/cds-dk | ||
| echo "$(npm config get prefix)/bin" >> "${GITHUB_PATH}" | ||
|
|
||
| - name: Install CDS dependencies | ||
| shell: bash | ||
| run: npm i | ||
| working-directory: integration-tests/mtx-local | ||
|
|
||
| - name: Bind objectstore | ||
| shell: bash | ||
| working-directory: integration-tests/mtx-local | ||
| run: | | ||
| for i in {1..5}; do | ||
| cds bind os -2 os:pipeline && break | ||
| echo "cds bind objectstore failed, retrying ($i/5)..." | ||
| sleep 30 | ||
| if [ "$i" -eq 5 ]; then | ||
| echo "cds bind objectstore failed after 5 attempts." | ||
| exit 1 | ||
| fi | ||
| done | ||
|
Schmarvinius marked this conversation as resolved.
|
||
|
|
||
| - name: Bind malware-scanner (basic) | ||
| if: inputs.auth-method == 'basic' | ||
| shell: bash | ||
| working-directory: integration-tests/mtx-local | ||
| run: cds bind malware -2 malware:malware-key-basic | ||
|
|
||
| - name: Bind malware-scanner (mtls) | ||
| if: inputs.auth-method == 'mtls' | ||
| shell: bash | ||
| working-directory: integration-tests/mtx-local | ||
| run: cds bind malware -2 malware:malware-key-mtls | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,35 +24,37 @@ runs: | |
| using: composite | ||
| steps: | ||
| - name: Set up Java ${{ inputs.java-version }} | ||
| uses: actions/setup-java@v5 | ||
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | ||
| with: | ||
| java-version: ${{ inputs.java-version }} | ||
| distribution: sapmachine | ||
| cache: maven | ||
|
|
||
| - name: Set up Maven ${{ inputs.maven-version }} | ||
| uses: stCarolas/setup-maven@v5 | ||
| uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5 | ||
| with: | ||
| maven-version: ${{ inputs.maven-version }} | ||
|
|
||
| - name: Get Major Version | ||
| id: get-major-version | ||
| - name: Get Revision | ||
| id: get-revision | ||
| run: | | ||
| echo "REVISION=$(mvn help:evaluate -Dexpression=revision -q -DforceStdout)" >> $GITHUB_OUTPUT | ||
| shell: bash | ||
|
|
||
| - name: Print Version Number | ||
| run: echo "${{ steps.get-major-version.outputs.REVISION }}" | ||
| shell: bash | ||
|
|
||
| - name: BlackDuck Scan | ||
| uses: SAP/project-piper-action@main | ||
| - name: BlackDuck Security Scan | ||
| uses: blackduck-inc/black-duck-security-scan@v2 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: All other third-party actions in this PR have been pinned to commit SHAs (e.g. Should be pinned to a specific commit SHA with a version comment, matching the pattern used everywhere else. Please provide feedback on the review comment by checking the appropriate box:
|
||
| with: | ||
| step-name: detectExecuteScan | ||
| flags: \ | ||
| --githubToken=$GITHUB_token \ | ||
| --version=${{ steps.get-major-version.outputs.REVISION }} | ||
| env: | ||
| PIPER_token: ${{ inputs.blackduck_token }} | ||
| GITHUB_token: ${{ inputs.github_token }} | ||
| SCAN_MODE: ${{ inputs.scan_mode }} | ||
| blackducksca_url: https://sap.blackducksoftware.com/ | ||
| blackducksca_token: ${{ inputs.blackduck_token }} | ||
| blackducksca_scan_full: ${{ inputs.scan_mode == 'FULL' }} | ||
| github_token: ${{ inputs.github_token }} | ||
| detect_args: > | ||
| --detect.project.name=com.sap.cds.feature.attachments | ||
| --detect.project.version.name=${{ steps.get-revision.outputs.REVISION }} | ||
| --detect.included.detector.types=MAVEN | ||
| --detect.excluded.directories=**/node_modules,**/*test*,**/localrepo,**/target/site,**/*-site.jar,**/samples/** | ||
| --detect.maven.excluded.modules=integration-tests,integration-tests/db,integration-tests/generic,integration-tests/mtx-local/srv | ||
| --detect.maven.build.command=-pl com.sap.cds:cds-feature-attachments | ||
| --detect.tools=DETECTOR,BINARY_SCAN | ||
| --detect.risk.report.pdf=false | ||
| --logging.level.detect=INFO | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| name: CodeQL Analysis | ||
| description: Runs CodeQL security analysis on the project. | ||
|
|
||
| inputs: | ||
| java-version: | ||
| description: The Java version to use for the build. | ||
| required: true | ||
| maven-version: | ||
| description: The Maven version to use for the build. | ||
| required: true | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Set up Java ${{ inputs.java-version }} | ||
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | ||
| with: | ||
| java-version: ${{ inputs.java-version }} | ||
| distribution: sapmachine | ||
| cache: maven | ||
|
|
||
| - name: Set up Maven ${{ inputs.maven-version }} | ||
| uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5 | ||
| with: | ||
| maven-version: ${{ inputs.maven-version }} | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@ed410739ba306e4ebe5e123421a6bd694e494a2b # v4 | ||
| with: | ||
| languages: java-kotlin | ||
| build-mode: manual | ||
|
|
||
| - name: Install @sap/cds-dk | ||
| run: npm i -g @sap/cds-dk | ||
| shell: bash | ||
|
|
||
| - name: Build Java code | ||
| run: mvn clean compile -B -ntp -Dcds.install-node.skip | ||
| shell: bash | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@ed410739ba306e4ebe5e123421a6bd694e494a2b # v4 | ||
| with: | ||
| category: "/language:java-kotlin" |
Uh oh!
There was an error while loading. Please reload this page.