Skip to content

Commit

Permalink
feat: SCC V2 Java SDK (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
archanaponnada authored Sep 15, 2023
1 parent 21d2f8f commit 139f582
Show file tree
Hide file tree
Showing 353 changed files with 40,776 additions and 14,964 deletions.
10 changes: 3 additions & 7 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.0.0
current_version = 4.0.0
commit = True
message = Update version {current_version} -> {new_version}

Expand All @@ -19,10 +19,6 @@ replace = {new_version}
search = {current_version}
replace = {new_version}

[bumpversion:file:modules/configuration-governance/pom.xml]
[bumpversion:file:modules/security-and-compliance-center-api/pom.xml]
search = {current_version}
replace = {new_version}

[bumpversion:file:modules/examples/pom.xml]
search = {current_version}
replace = {new_version}
replace = {new_version}
37 changes: 26 additions & 11 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: CI/CD Pipeline
on: [push, pull_request, workflow_dispatch]
on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
verify:
Expand Down Expand Up @@ -46,9 +50,8 @@ jobs:
- name: running integration tests
env:
ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }}
CONFIGURATION_GOVERNANCE_ENV: ${{ secrets.CONFIGURATION_GOVERNANCE_ENV }}
RESOURCE_GROUP_ID: ${{ secrets.RESOURCE_GROUP_ID }}
SCC_ENV: ${{ secrets.SCC_ENV }}
SECURITY_AND_COMPLIANCE_CENTER_API_IAM_PROFILE_ID: ${{ secrets.SCC_IAM_PROFILE_ID }}
run: build/testScript.sh

release:
Expand All @@ -62,7 +65,12 @@ jobs:
- name: setting up nodejs
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '18'

- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: releasing using semantic-release
env:
Expand All @@ -72,13 +80,13 @@ jobs:
GIT_COMMITTER_NAME: sccdeveloper
GIT_COMMITTER_EMAIL: [email protected]
run: |
sudo apt-get update
sudo apt-get install python
pip install --user bumpversion
npm install @semantic-release/changelog
npm install @semantic-release/exec
npm install @semantic-release/git
npm install @semantic-release/github
rm -rf package.json
rm -rf package-lock.json
npx semantic-release
publish:
Expand Down Expand Up @@ -134,10 +142,17 @@ jobs:
run: build/prepareJavadoc.sh

- name: deploying javadocs to gh-pages
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: javadocs
run: |
git config --global user.email "[email protected]"
git config --global user.name "sccdeveloper"
git config --global user.password "${{ secrets.ADMIN_TOKEN }}"
cd v4/dist
git init
git add .
git commit -m "Deploy to GitHub pages"
git branch -m gh-pages
git remote add origin https://github.com/IBM/scc-java-sdk
git push -f origin gh-pages
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
GIT_AUTHOR_NAME: sccdeveloper
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ hs_err_pid*
package-lock.json

# Examples depedency file
/**/dependency-reduced-pom.xml
/**/dependency-reduced-pom.xml

*.iml
*.DS_Store
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Maven Central](https://img.shields.io/maven-central/v/com.ibm.cloud/scc.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.ibm.cloud%22%20AND%20a:%22scc%22)

# IBM Cloud Security & Compliance Center Java SDK Version 3.0.0
Java client library to interact with various [IBM Cloud Security & Compliance Center](https://cloud.ibm.com/docs?tab=api-docs&category=platform_services%2Csecurity).
Java client library to interact with various [IBM Cloud Security & Compliance Center](https://cloud.ibm.com/apidocs/security-compliance?code=java).

Disclaimer: this SDK is being released initially as a **pre-release** version.
Changes might occur which impact applications that use this SDK.
Expand Down Expand Up @@ -46,7 +46,7 @@ The IBM Cloud Security & Compliance Center Java SDK allows developers to program

Service Name | Imported Class Name
--- | ---
[ConfigurationGovernanceApi](https://cloud.ibm.com/apidocs/security-compliance/config) | ConfigurationGovernanceApi:3.0.0
[Security and Compliance Center](https://cloud.ibm.com/apidocs/security-compliance) | SecurityAndComplianceCenterApi:3.0.0

## Prerequisites

Expand Down Expand Up @@ -108,4 +108,4 @@ See [CONTRIBUTING](CONTRIBUTING.md).
## License

The IBM Cloud MySDK Java SDK is released under the Apache 2.0 license.
The license's full text can be found in [LICENSE](LICENSE).
The license's full text can be found in [LICENSE](LICENSE).
4 changes: 2 additions & 2 deletions build/publishCodeCoverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
printf ">>>>> Publishing code coverage info\n"

JACOCO_SOURCE_PATH=modules/common/src/main/java ./cc-test-reporter format-coverage modules/common/target/site/jacoco/jacoco.xml -d -o common.json -t jacoco
JACOCO_SOURCE_PATH=modules/configuration-governance/src/main/java ./cc-test-reporter format-coverage modules/configuration-governance/target/site/jacoco/jacoco.xml -d -o configuration-governance.json -t jacoco
JACOCO_SOURCE_PATH=modules/security-and-compliance-center-api/src/main/java ./cc-test-reporter format-coverage modules/security-and-compliance-center-api/target/site/jacoco/jacoco.xml -d -o security-and-compliance-center-api.json -t jacoco

./cc-test-reporter sum-coverage common.json configuration-governance.json -o coverage.json -d
./cc-test-reporter sum-coverage common.json security-and-compliance-center-api.json -o coverage.json -d

./cc-test-reporter upload-coverage --input coverage.json
4 changes: 1 addition & 3 deletions build/testScript.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

set -euo pipefail

curl https://us-south.functions.appdomain.cloud/api/v1/web/e6b54af6-ab44-4149-a8e4-e906dcc58136/default/secadvstg-location-shift.json
echo "${CONFIGURATION_GOVERNANCE_ENV}" | base64 -d >> configuration_governance_v1.env
echo "${SCC_ENV}" | base64 -d >> security_and_compliance_center_api_v3.env
mvn clean verify
Loading

0 comments on commit 139f582

Please sign in to comment.