Skip to content
Open
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
49 changes: 49 additions & 0 deletions workflow-templates/python_property.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "CI Pipeline",
"triggers": {
"on_push_to": "$default-branch",
"on_pull_request_to": "$default-branch"
},
"environment": {
"SONAR_SCANNER_VERSION": "6.1.0.4477",
"SONAR_SCANNER_HOME": "${{ github.workspace }}/sonar-scanner",
"PYTHON_VERSION": "3.11",
"POETRY_VERSION": "1.8.0"
},
"jobs": {
"run-tests": {
"name": "Run Python Tests",
"runs-on": "self-hosted",
"steps": [
"Checkout code",
"Set up Python",
"Install Poetry",
"Cache Poetry dependencies",
"Install dependencies (if cache miss)",
"Run tests using Poetry",
"Download and install SonarQube Scanner",
"Run SonarQube Scanner with secrets"
]
},
"docker-build-push": {
"name": "Build and Push Docker Images",
"runs-on": "ubuntu-latest",
"needs": ["run-tests"],
"condition": "push only",
"steps": [
"Checkout code",
"Set up Docker Buildx",
"Log in to Docker Hub",
"Extract Docker metadata for backend",
"Build and push Docker backend image with caching"
]
}
},
"secrets_used": [
"SONAR_TOKEN",
"SONAR_HOST_URL",
"SONAR_PROJECT_KEY",
"DOCKERHUB_USERNAME",
"DOCKERHUB_TOKEN"
]
}