Skip to content

Commit c5ae69b

Browse files
SSP onboarding pass 1
1 parent 6c75483 commit c5ae69b

File tree

5 files changed

+72
-11
lines changed

5 files changed

+72
-11
lines changed

.cra/cra-scan-custom-script.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,7 @@ export BUILD_ARM_TOKEN=$(get_env jfrog_func_is_token)
1212
export BUILD_ARM_PASSWORD=$(get_env jfrog_func_is_token)
1313
export BUILD_ARM_USERNAME=Ibm-webmethods-integration-server@ibm.com
1414

15-
16-
which java
17-
java -version
18-
cat /etc/*elease*
19-
id
20-
21-
# Install JDK 17
22-
dnf install -y java-17-openjdk-devel
23-
export JAVA_HOME=/usr/lib/jvm/java-17
24-
$JAVA_HOME/bin/java -version
25-
15+
source "$(dirname "${BASH_SOURCE[0]}")/install-jdk.sh"
2616

2717
# debug: dump all scripts
2818
find /opt/commons/compliance-checks | while read filename ; do

.cra/install-jdk.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
# This script is broken out because it's used from both SSP and PR scans
4+
5+
which java
6+
java -version
7+
cat /etc/*elease*
8+
id
9+
10+
# create a gradle environment on the build agent
11+
mkdir -p ~/.gradle/
12+
13+
echo "Using pre-installed Java $JAVA_VERSION in $JAVA_HOME and creating toolchains.xml"
14+
15+
cat > ~/.gradle/gradle.properties << EOF
16+
sonatypeUser = $BUILD_ARM_USERNAME
17+
sonatypePwd = $BUILD_ARM_TOKEN
18+
java${JAVA_VERSION}Home = $JAVA_HOME
19+
EOF
20+
21+
# Install JDK 17
22+
dnf install -y java-17-openjdk-devel
23+
export JAVA_HOME=/usr/lib/jvm/java-17
24+
$JAVA_HOME/bin/java -version
25+
echo "java17Home = $JAVA_HOME" >> ~/.gradle/gradle.properties
26+
27+
cat ~/.gradle/gradle.properties

.github/workflows/fedramp-ssp.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Trigger remote SPS scans job for FedRAMP compliance
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
inputs:
9+
10+
repo-branch:
11+
description: Specify the repo branch to scan if scan-type is "repo-scan"
12+
type: string
13+
default: master
14+
15+
jobs:
16+
fedramp-scan:
17+
uses: ibm-webmethods/bic-images-build-pipeline/.github/workflows/fedramp-ssp-scans.yml@main
18+
with:
19+
scan-type: repo-scan
20+
repo-name: ehcache3
21+
repo-branch: ${{ inputs.repo-branch || 'master' }}
22+
runner-label: self-hosted
23+
secrets:
24+
GH_PAT: ${{ secrets.TC_GH_PAT }}
25+
SPS_TRIGGER_API: ${{ secrets.SPS_TRIGGER_API }}
26+
# WEBMETHODS_APIKEY: ${{ secrets.SPS_ICR_API_KEY }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
env
4+
5+
export BUILD_ARM_USERNAME=$(get_env BUILD_ARM_USERNAME)
6+
export BUILD_ARM_TOKEN=$(get_env BUILD_ARM_TOKEN)
7+
export BUILD_ARM_PASSWORD=$(get_env BUILD_ARM_TOKEN)
8+
9+
echo "Begin Compliance custom script"
10+
11+
source "$(dirname "${BASH_SOURCE[0]}")/.cra/install-jdk.sh"
12+
13+
set -ex
14+
15+
# perform the build so compliance checks can scan everything
16+
./gradlew assemble
17+
18+
echo "End Compliance custom script"

0 commit comments

Comments
 (0)