Skip to content

Commit

Permalink
perf(SCC): Releasing SCC v2 Python SDK
Browse files Browse the repository at this point in the history
BREAKING CHANGE: SCC v2 Python SDK

Signed-off-by: Gaurav Goswami <gouravgoswami48@gmail.com>
  • Loading branch information
pavanm87 authored and gary1998 committed Sep 15, 2023
1 parent 3cae5a3 commit 9471fdc
Show file tree
Hide file tree
Showing 14 changed files with 27,433 additions and 6,057 deletions.
44 changes: 29 additions & 15 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: CI/CD Pipeline
on: [push, pull_request, workflow_dispatch]
on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
verify:
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, 'chore') && !startsWith(github.ref, 'refs/tags/v')"
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.9, "3.10", 3.11]
steps:
- uses: actions/checkout@v1

Expand All @@ -28,7 +32,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.9, "3.10", 3.11]
steps:
- name: setup extensions
uses: actions/checkout@v1
Expand All @@ -55,9 +59,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 @@ -71,7 +74,7 @@ jobs:
- name: setup nodejs
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '18'

- name: release using semantic-release
env:
Expand All @@ -83,13 +86,13 @@ jobs:
GIT_COMMITTER_NAME: scccomm
GIT_COMMITTER_EMAIL: scccomm@in.ibm.com
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 @@ -129,10 +132,21 @@ jobs:
pip install -e .
pdoc ibm_scc -o html
- name: deploy gopages to gh-pages
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: html
- name: deploy python to gh-pages
run: |
git config --global user.email "scccomm@in.ibm.com"
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-python-sdk
git push -f origin gh-pages
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
GIT_AUTHOR_NAME: sccdeveloper
GIT_AUTHOR_EMAIL: scccomm@in.ibm.com
GIT_COMMITTER_NAME: sccdeveloper
GIT_COMMITTER_EMAIL: scccomm@in.ibm.com
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[![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)
# IBM Cloud Security & Compliance Center Python SDK Version 3.0.0

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).
Python client library to interact with various [IBM Cloud Security & Compliance Center APIs](https://cloud.ibm.com/apidocs/security-compliance?code=python).

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 @@ -47,7 +47,7 @@ IBM Cloud services:

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

## Prerequisites

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

This SDK is released under the Apache 2.0 license.
The license's full text can be found in [LICENSE](https://github.ibm.com/CloudEngineering/python-sdk-template/blob/main/LICENSE).
The license's full text can be found in [LICENSE](https://github.ibm.com/CloudEngineering/python-sdk-template/blob/main/LICENSE).
5 changes: 1 addition & 4 deletions build/testScript.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/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
python -m pytest test/integration
Loading

0 comments on commit 9471fdc

Please sign in to comment.