CI/CD Pipelines¶
Used Stacks
GitHub Actions (Black, flake8, Pylint, Setuptools, PyTest, Codecov, Sphinx)
Branch Rules¶
Dev Branch¶
Branch Rule
The dev
branch is used when there are functional changes resulting in different build outcomes.
dev-*
pushcheck-pr
: Check if a PR is open for thedev-*
branchbuild
: Install dependencies & build packagelint
: Check format of python codestest
: Do PyTest
dev-*
→master
check-commit
: Commit message parsingbuild
: Install dependencies & build packagelint
: Check format of python codestest
: Do PyTestdocs
: Create PR (docs
→dev-*
) including the build results generated by Sphinxmerge-from-docs
: If merge PR fromdocs
, can mergedev-*
→master
master
pushbuild
: Install dependencies & build packagetest
: Do PyTestdeploy
GitHub
: Deploy to GitHubPyPI
: Deploy to PyPI
Chore Branch¶
Branch Rule
The chore
branch is utilized when the build result is not different, but there are changes in the CI/CD pipeline or documentation.
chore-*
pushchore-*
→master
check-commit
: Commit message parsingbuild
: Install dependencies & build packagelint
: Check format of python codestest
: Do PyTestdocs
: Create PR (docs
→dev-*
) including the build results generated by Sphinxmerge-from-docs
: If merge PR fromdocs
, can mergedev-*
→master
master
pushbuild
: Install dependencies & build packagetest
: Do PyTest
Managing Labels for Issues and Pull Requests in GitHub¶
-
assignees: ['Zerohertz']
contains(github.event.issue.title, '[Bug]')
→labels: ['fix']
contains(github.event.issue.title, '[Chore]')
→labels: ['chore']
contains(github.event.issue.title, '[Style]')
→labels: ['style']
contains(github.event.issue.title, '[Docs]')
→labels: ['docs']
-
assignees: ['Zerohertz']
body.includes('bug') || body.includes('fix') || body.includes('수정')
→labelsToAdd.push('fix')
body.includes('style')
→labelsToAdd.push('style')
baseBranch === 'master' && headBranch.startsWith('dev')
labelsToAdd.push('release')
(file.filename.startsWith('Jenkins') || file.filename.startsWith('.github/workflows'))
→labelsToAdd.push('chore')
(file.filename.startsWith('sphinx') && !file.filename.includes('release'))
→labelsToAdd.push('docs')
(file.filename.startsWith('zerohertzLib/{MODULE_NAME}/__init__') || body.includes('{MODULE_NAME}'))
→labelsToAdd.push('feat/{MODULE_NAME}')
baseBranch === 'master' && headBranch.startsWith('chore')
labelsToAdd.push('release/chore')
(file.filename.startsWith('Jenkins') || file.filename.startsWith('.github/workflows'))
→labelsToAdd.push('chore')
(file.filename.startsWith('sphinx') && !file.filename.includes('release'))
→labelsToAdd.push('docs')
baseBranch.startsWith('dev') || baseBranch.startsWith('chore')) && headBranch === 'docs'
labelsToAdd.push('docs')
Sphinx Documentation Deployment¶
Sphinx Documentation
Documents created and built using Sphinx are deployed via GitHub Actions and GitHub Pages
Jenkins (Deprecated)
Used Stacks
Jenkins (Black, flake8, Pylint, Setuptools, PyTest, Sphinx)
Jenkins
Stage |
Condition |
---|---|
1. |
⭕ [ |
2. |
⭕ [ |
3. |
⭕ [ |
4. |
⭕ [ |
5. |
⭕ [ |
6. |
⭕ [ |
7. |
⭕ [ |
Dev Branch
Branch Rule
The dev
branch is used when there are functional changes resulting in different build outcomes.
dev-*
pushSetup
: Commit message parsing1. Lint
: Check format of python codes2. Build
: Install dependencies & build package3. Test
: Do PyTest
dev-*
→master
Setup
: Commit message parsing1. Lint
: Check format of python codes2. Build
: Install dependencies & build package3. Test
: Do PyTest4. Docs
: Create PR (docs
→dev-*
) including the build results generated by SphinxMerge From Docs
: If merge PR fromdocs
, can mergedev-*
→master
master
pushSetup
: Commit message parsing2. Build
: Install dependencies & build packageDeploy
GitHub
: Deploy to GitHubPyPI
: Deploy to PyPI
Chore Branch
Branch Rule
The chore
branch is utilized when the build result is not different, but there are changes in the CI/CD pipeline or documentation.
chore-*
pushSetup
: Commit message parsing
chore-*
→master
Setup
: Commit message parsing1. Lint
: Check format of python codes2. Build
: Install dependencies & build package3. Test
: Do PyTest4. Docs
: Create PR (docs
→chore-*
) including the build results generated by SphinxMerge From Docs
: If merge PR fromdocs
, can mergechore-*
→master
master
pushSetup
: Commit message parsing