Skip to content

Commit 9471fdc

Browse files
pavanm87gary1998
authored andcommitted
perf(SCC): Releasing SCC v2 Python SDK
BREAKING CHANGE: SCC v2 Python SDK Signed-off-by: Gaurav Goswami <[email protected]>
1 parent 3cae5a3 commit 9471fdc

14 files changed

+27433
-6057
lines changed

.github/workflows/main.yaml

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
name: CI/CD Pipeline
2-
on: [push, pull_request, workflow_dispatch]
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
workflow_dispatch:
37

48
jobs:
59
verify:
610
runs-on: ubuntu-latest
711
if: "!startsWith(github.event.head_commit.message, 'chore') && !startsWith(github.ref, 'refs/tags/v')"
812
strategy:
913
matrix:
10-
python-version: [3.7, 3.8, 3.9]
14+
python-version: [3.9, "3.10", 3.11]
1115
steps:
1216
- uses: actions/checkout@v1
1317

@@ -28,7 +32,7 @@ jobs:
2832
strategy:
2933
max-parallel: 2
3034
matrix:
31-
python-version: [3.7, 3.8, 3.9]
35+
python-version: [3.9, "3.10", 3.11]
3236
steps:
3337
- name: setup extensions
3438
uses: actions/checkout@v1
@@ -55,9 +59,8 @@ jobs:
5559
5660
- name: running integration tests
5761
env:
58-
ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }}
59-
CONFIGURATION_GOVERNANCE_ENV: ${{ secrets.CONFIGURATION_GOVERNANCE_ENV }}
60-
RESOURCE_GROUP_ID: ${{ secrets.RESOURCE_GROUP_ID }}
62+
SCC_ENV: ${{ secrets.SCC_ENV }}
63+
SECURITY_AND_COMPLIANCE_CENTER_API_IAM_PROFILE_ID: ${{ secrets.SCC_IAM_PROFILE_ID }}
6164
run: build/testScript.sh
6265

6366
release:
@@ -71,7 +74,7 @@ jobs:
7174
- name: setup nodejs
7275
uses: actions/setup-node@v2
7376
with:
74-
node-version: '16'
77+
node-version: '18'
7578

7679
- name: release using semantic-release
7780
env:
@@ -83,13 +86,13 @@ jobs:
8386
GIT_COMMITTER_NAME: scccomm
8487
GIT_COMMITTER_EMAIL: [email protected]
8588
run: |
86-
sudo apt-get update
87-
sudo apt-get install python
8889
pip install --user bumpversion
8990
npm install @semantic-release/changelog
9091
npm install @semantic-release/exec
9192
npm install @semantic-release/git
9293
npm install @semantic-release/github
94+
rm -rf package.json
95+
rm -rf package-lock.json
9396
npx semantic-release
9497
9598
publish:
@@ -129,10 +132,21 @@ jobs:
129132
pip install -e .
130133
pdoc ibm_scc -o html
131134
132-
- name: deploy gopages to gh-pages
133-
uses: crazy-max/ghaction-github-pages@v1
134-
with:
135-
target_branch: gh-pages
136-
build_dir: html
135+
- name: deploy python to gh-pages
136+
run: |
137+
git config --global user.email "[email protected]"
138+
git config --global user.name "sccdeveloper"
139+
git config --global user.password "${{ secrets.ADMIN_TOKEN }}"
140+
cd v4/dist
141+
git init
142+
git add .
143+
git commit -m "Deploy to GitHub pages"
144+
git branch -m gh-pages
145+
git remote add origin https://github.com/IBM/scc-python-sdk
146+
git push -f origin gh-pages
137147
env:
138-
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
148+
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
149+
GIT_AUTHOR_NAME: sccdeveloper
150+
GIT_AUTHOR_EMAIL: [email protected]
151+
GIT_COMMITTER_NAME: sccdeveloper
152+
GIT_COMMITTER_EMAIL: [email protected]

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
1010
# IBM Cloud Security & Compliance Center Python SDK Version 3.0.0
1111

12-
Python client library to interact with various [IBM Cloud Security & Compliance Center APIs](https://cloud.ibm.com/docs?tab=api-docs&category=platform_services%2Csecurity).
12+
Python client library to interact with various [IBM Cloud Security & Compliance Center APIs](https://cloud.ibm.com/apidocs/security-compliance?code=python).
1313

1414
Disclaimer: this SDK is being released initially as a **pre-release** version.
1515
Changes might occur which impact applications that use this SDK.
@@ -47,7 +47,7 @@ IBM Cloud services:
4747

4848
Service Name | Module Name | Imported Class Name
4949
--- | --- | ---
50-
[Configuration Governance](https://cloud.ibm.com/apidocs/security-compliance/config) | configuration_governance_v1 | ConfigurationGovernanceV1
50+
[Security and Compliance Center](https://cloud.ibm.com/apidocs/security-compliance) | ibm_scc.security_and_compliance_center_api_v3 | SecurityAndComplianceCenterApiV3
5151

5252
## Prerequisites
5353

@@ -94,4 +94,4 @@ See [CONTRIBUTING.md](https://github.ibm.com/CloudEngineering/python-sdk-templat
9494
## License
9595

9696
This SDK is released under the Apache 2.0 license.
97-
The license's full text can be found in [LICENSE](https://github.ibm.com/CloudEngineering/python-sdk-template/blob/main/LICENSE).
97+
The license's full text can be found in [LICENSE](https://github.ibm.com/CloudEngineering/python-sdk-template/blob/main/LICENSE).

build/testScript.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
#!/bin/bash
2-
32
set -euo pipefail
4-
5-
curl https://us-south.functions.appdomain.cloud/api/v1/web/e6b54af6-ab44-4149-a8e4-e906dcc58136/default/secadvstg-location-shift.json
6-
echo "${CONFIGURATION_GOVERNANCE_ENV}" | base64 -d >> configuration_governance_v1.env
3+
echo "${SCC_ENV}" | base64 -d >> security_and_compliance_center_api_v3.env
74
python -m pytest test/integration

0 commit comments

Comments
 (0)