CI/CD Pipelines¶
Used Stacks
Jenkins (Black, flake8, Pylint, Setuptools, PyTest, Sphinx)
GitHub Actions
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-*→masterSetup: 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
masterpushSetup: Commit message parsing2. Build: Install dependencies & build packageDeployGitHub: 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-*→masterSetup: 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
masterpushSetup: Commit message parsing
GitHub Actions¶
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