Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: pr

on:
pull_request:
branches:
- main
workflow_dispatch:
# Allow workflow to be triggered manually.

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
detect-secrets:
name: detect-secrets
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: 'pip'

- name: Install detect-secrets
run: |
pip install --upgrade "git+https://github.com/ibm/detect-secrets.git@master#egg=detect-secrets"

- name: Run detect-secrets
run: |
detect-secrets scan --update .secrets.baseline
detect-secrets -v audit --report --fail-on-unaudited --fail-on-live --fail-on-audited-real .secrets.baseline

build-test:
name: Build and Test (Python ${{ matrix.python-version }})
needs: detect-secrets
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Run CI build
run: make ci
99 changes: 99 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: release

on:
push:
branches:
- main
workflow_dispatch:
inputs:
dry_run:
description: 'Run semantic-release in dry-run mode'
required: false
type: boolean
default: true

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
semantic-release:
name: Semantic Release
runs-on: ubuntu-latest
timeout-minutes: 30
# Only run on one Python version to avoid duplicate releases

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip'

- name: Install Node.js dependencies
run: npm install

- name: Install bump-my-version
run: pip install bump-my-version

- name: Semantic Release (Dry Run)
if: github.event_name == 'workflow_dispatch' && inputs.dry_run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run semantic-release --dry-run

- name: Semantic Release
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && !inputs.dry_run)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run semantic-release

publish:
name: Publish to PyPI
needs: semantic-release
runs-on: ubuntu-latest
timeout-minutes: 30
if: (github.ref_name == 'main' && github.event_name == 'push') || (github.ref_name == 'main' && github.event_name == 'workflow_dispatch' && !inputs.dry_run)

permissions:
contents: read
id-token: write # Required for trusted publishing

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip'

- name: Run CI build
run: make ci

- name: Install publish dependencies
run: make publish-deps

- name: Build distribution
run: make build-dist

# Requires TWINE_PASSWORD to be configured in secrets
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
PYTHON=python3
PYTHON=python
PYTHON3=python3
LINT=black
LINT_DIRS=ibm_continuous_delivery test/unit test/integration examples

Expand Down
35 changes: 16 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# IBM Cloud Continuous Delivery Python SDK

[![Build Status](https://app.travis-ci.com/IBM/continuous-delivery-python-sdk.svg?branch=main)](https://app.travis-ci.com/github/IBM/continuous-delivery-python-sdk)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ibm-continuous-delivery)](https://pypi.org/project/ibm-continuous-delivery/)
[![Latest Stable Version](https://img.shields.io/pypi/v/ibm-continuous-delivery.svg)](https://pypi.python.org/pypi/ibm-continuous-delivery)
[![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 Continuous Delivery Python SDK v2.0.5

The Python client library to interact with the [IBM Cloud Continuous Delivery Toolchain and Tekton Pipeline APIs](https://cloud.ibm.com/docs?tab=api-docs&category=devops).

# Python Version
The current minimum Python version supported is 3.9.
## Version

- The current version of this SDK: 2.0.5
- The current minimum Python version supported: 3.9

## Table of Contents

Expand All @@ -24,7 +26,7 @@ The current minimum Python version supported is 3.9.

<!-- toc -->

- [IBM Cloud Continuous Delivery Python SDK v2.0.5](#ibm-cloud-continuous-delivery-python-sdk-v170)
- [IBM Cloud Continuous Delivery Python SDK](#ibm-cloud-continuous-delivery-python-sdk)
- [Python Version](#python-version)
- [Table of Contents](#table-of-contents)
- [Overview](#overview)
Expand Down Expand Up @@ -53,9 +55,9 @@ Service Name | Module Name | Imported Class Name

[ibm-cloud-onboarding]: https://cloud.ibm.com/registration

* An [IBM Cloud][ibm-cloud-onboarding] account.
* An IAM API key to allow the SDK to access your account. Create one [here](https://cloud.ibm.com/iam/apikeys).
* Python 3.7 or above.
- An [IBM Cloud][ibm-cloud-onboarding] account.
- An IAM API key to allow the SDK to access your account. Create one [here](https://cloud.ibm.com/iam/apikeys).
- Python 3.9 or above.

## Installation

Expand All @@ -66,24 +68,19 @@ python -m pip install --upgrade ibm-continuous-delivery
```

## Using the SDK
For general SDK usage information, please see [this link](https://github.com/IBM/ibm-cloud-sdk-common/blob/main/README.md)

## Questions

If you are having difficulties using this SDK or have a question about the IBM Cloud services,
please ask a question at
[Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-cloud).
Alternatively, you can reach out to the IBM Cloud Continuous Delivery development team by joining us on [Slack](https://ic-devops-slack-invite.us-south.devops.cloud.ibm.com/).
For general SDK usage information, please see [this link](https://github.com/IBM/ibm-cloud-sdk-common/blob/main/README.md).

## Issues
If you encounter an issue with the project, you are welcome to submit a
[bug report](https://github.com/IBM/continuous-delivery-python-sdk/issues).
Before that, please search for similar issues. It's possible that someone has already reported the problem.

If you encounter an issue with the project, you are welcome to submit a [bug report](https://github.com/IBM/continuous-delivery-python-sdk/issues). Before that, please search for similar issues. It's possible that someone has already reported the problem.

## Open source @ IBM
Find more open source projects on the [IBM Github Page](http://ibm.github.io/)

Find more open source projects on the [IBM Github Page](http://ibm.github.io/).

## Contributing

See [CONTRIBUTING.md](https://github.com/IBM/continuous-delivery-python-sdk/blob/main/CONTRIBUTING.md).

## License
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
"description": "This package.json is being used to manage semantic-release and its dependencies",
"license": "Apache-2.0",
"devDependencies": {
"semantic-release": "21.0.7",
"semantic-release": "^25.0.3",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/exec": "6.0.3",
"@semantic-release/git": "10.0.1"
},
"overrides": {
"semver": "^7.5.3"
},
"scripts": {
"semantic-release": "semantic-release"
}
Expand Down