{"id":18293052,"url":"https://github.com/kubesphere/devops-python-sample","last_synced_at":"2026-03-04T12:31:41.822Z","repository":{"id":43899668,"uuid":"206779197","full_name":"kubesphere/devops-python-sample","owner":"kubesphere","description":"devops-python-sample for Kubesphere","archived":false,"fork":false,"pushed_at":"2024-10-29T17:25:15.000Z","size":8352,"stargazers_count":4,"open_issues_count":1,"forks_count":47,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-16T14:33:12.289Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kubesphere.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-06T11:25:48.000Z","updated_at":"2025-05-03T15:58:42.000Z","dependencies_parsed_at":"2024-03-25T18:22:48.510Z","dependency_job_id":"052542e6-b966-48de-8a37-d443346f60c0","html_url":"https://github.com/kubesphere/devops-python-sample","commit_stats":{"total_commits":8,"total_committers":3,"mean_commits":"2.6666666666666665","dds":0.5,"last_synced_commit":"6a92ee3bf64bfb266d273eff5ac639bae37aeda8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kubesphere/devops-python-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fdevops-python-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fdevops-python-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fdevops-python-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fdevops-python-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kubesphere","download_url":"https://codeload.github.com/kubesphere/devops-python-sample/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fdevops-python-sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30079737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T12:28:08.313Z","status":"ssl_error","status_checked_at":"2026-03-04T12:27:28.210Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T14:21:31.822Z","updated_at":"2026-03-04T12:31:41.803Z","avatar_url":"https://github.com/kubesphere.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# devops-python-sample\n\n## 项目简介\n\n这是一个在 Kubesphere 上使用 DevOps 发布 Python 应用的一个 Demo 。\n\n[KubeSphere](https://kubesphere.io) 是在目前主流容器调度平台 Kubernetes 之上构建的企业级分布式多租户容器管理平台。\n\n## 环境依赖\n\n- Kubesphere 平台\n- Github 账户\n- DockerHub 账户\n\n## 部署步骤\n\n1. 在 Kubesphere 平台，创建命名为 django-proj 的项目。\n\n在 Kubesphere 中，项目对应 namespace 。如果不使用 django-proj 命名空间，则需要修改 Jenkinsfile 文件，保持一致。\n\n2. 在 sonarqube 平台创建命名为 django 的工程。\n\nkey 设置为 django，获取 token 值。\n\n3. 创建 DockerHub 、Kubeconfig 、sonar-token 凭证。\n\n建议将 Dockerhub 凭证命名为 dockerhub ，将 Kubeconfig 凭证命名为 kubeconfig ，将 sonarqube 凭证命名为 sonar-token。如果使用其他命名，则需要修改 Jenkinsfile 文件中相关变量，保持一致。\n\n4. 修改基本信息\n\n将 Jenkinsfile 中 DOCKERHUB_NAMESPACE 和拉取代码的 URL 修改为合适的值\n\n5. 创建一个 DevOps 工程。\n\n选择使用图形化构建，点击 【编辑 Jenkinsfile】，将项目下的 Jenkinsfile 文件粘贴保存，点击运行即可。\n\n6. 在 django-proj 项目中，找到 django-demo 服务，可以查看到相关的访问 NodePort 端口。\n\n通过集群外部访问 IP + NodePort 端口，就可以访问到 Django 提供的页面。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubesphere%2Fdevops-python-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubesphere%2Fdevops-python-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubesphere%2Fdevops-python-sample/lists"}