diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..45df14a71215f94dd57637864d2347c2a3ec7c06 --- /dev/null +++ b/README.en.md @@ -0,0 +1,130 @@ +# DevOps .NET Demo + +This is a DevOps demonstration project based on .NET technology, showcasing the application development, testing, and deployment workflow in DevOps practices. + +## Project Overview + +This project aims to demonstrate and practice the application of DevOps best practices in .NET application development, including: + +- **Continuous Integration (CI)**: Automated build and test workflows +- **Continuous Deployment (CD)**: Automated deployment to various environments +- **Code Quality Management**: Code review, static analysis, unit testing +- **Containerization Support**: Docker containerized deployment +- **Cloud-native Features**: Suitable for running in cloud environments + +## Tech Stack + +- **.NET Version**: .NET 6.0 or higher recommended +- **Programming Language**: C# +- **Target Framework**: Based on specific project requirements (Console App, Web API, ASP.NET Core, etc.) +- **Dependency Management**: NuGet Package Manager + +## Quick Start + +### Environment Requirements + +- .NET SDK 6.0 or higher +- Docker (Optional, for containerized deployment) +- Access permissions (for deployment to target environment) + +### Installation Steps + +1. **Clone Project** + ```bash + git clone https://gitee.com/devopsany/devops-dotnet-demo.git + cd devops-dotnet-demo + ``` + +2. **Restore Dependencies** + ```bash + dotnet restore + ``` + +3. **Build Project** + ```bash + dotnet build + ``` + +4. **Run Tests** + ```bash + dotnet test + ``` + +## Project Structure + +``` +devops-dotnet-demo/ +├── .gitignore # Git ignore file configuration +├── LICENSE # Project License +├── src/ # Source code directory +├── tests/ # Test code directory +├── docker-compose.yml # Docker Compose configuration +├── Dockerfile # Docker build file +├── azure-pipelines.yml # Azure DevOps pipeline configuration +├── Jenkinsfile # Jenkins pipeline configuration +└── README.md # Project documentation +``` + +## Usage Instructions + +### Run Application + +```bash +dotnet run --project src/YourProject +``` + +### Run Tests + +```bash +dotnet test +``` + +### Docker Deployment + +```bash +docker build -t devops-dotnet-demo . +docker run -p 5000:80 devops-dotnet-demo +``` + +## CI/CD Integration + +This project is configured with support for various CI/CD tools: + +### Azure DevOps + +The project includes an `azure-pipelines.yml` file for automated building and deployment in Azure DevOps. + +### Jenkins + +Includes a `Jenkinsfile` for automated deployment via Jenkins pipelines. + +### GitLab CI + +If using in GitLab, add a `.gitlab-ci.yml` configuration file. + +## Contribution Guidelines + +Contributions to this project are welcome! Please follow these steps: + +1. Fork the project +2. Create a feature branch (`git checkout -b feature/AmazingFeature`) +3. Commit changes (`git commit -m 'Add some AmazingFeature'`) +4. Push to the branch (`git push origin feature/AmazingFeature`) +5. Create a Pull Request + +## License + +This project is protected by a license. For specific information, please refer to the [LICENSE](LICENSE) file. + +## Contact Information + +- **Project Repository**: https://gitee.com/devopsany/devops-dotnet-demo +- **Issue Feedback**: Submit issues via Gitee Issues + +## Notes + +This project is a demonstration project used to showcase the application of DevOps practices in .NET applications. It is recommended to make corresponding adjustments and optimizations based on actual production environment requirements. + +--- + +**Note**: Due to the relatively simple structure of the current repository, some directories and functions may need to be expanded and supplemented according to actual needs. It is recommended to review the specific implementation code in the project for more details. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ac94d99b33cb18329c825c813330e978cdc40de7 --- /dev/null +++ b/README.md @@ -0,0 +1,132 @@ + + +# DevOps .NET Demo + +这是一个基于 .NET 技术的 DevOps 演示项目,展示了在 DevOps 实践中的 .NET 应用程序开发、测试和部署流程。 + +## 项目概述 + +本项目旨在演示和实践 DevOps 最佳实践在 .NET 应用程序开发中的应用,包括: + +- **持续集成 (CI)**: 自动化构建和测试流程 +- **持续部署 (CD)**: 自动化部署到各种环境 +- **代码质量管理**: 代码审查、静态分析、单元测试 +- **容器化支持**: Docker 容器化部署 +- **云原生特性**: 适合在云环境中运行 + +## 技术栈 + +- **.NET 版本**: 建议使用 .NET 6.0 或更高版本 +- **编程语言**: C# +- **目标框架**: 根据项目具体需求(控制台应用、Web API、ASP.NET Core 等) +- **依赖管理**: NuGet 包管理器 + +## 快速开始 + +### 环境要求 + +- .NET SDK 6.0 或更高版本 +- Docker(可选,用于容器化部署) +- 访问权限(用于部署到目标环境) + +### 安装步骤 + +1. **克隆项目** + ```bash + git clone https://gitee.com/devopsany/devops-dotnet-demo.git + cd devops-dotnet-demo + ``` + +2. **还原依赖** + ```bash + dotnet restore + ``` + +3. **构建项目** + ```bash + dotnet build + ``` + +4. **运行测试** + ```bash + dotnet test + ``` + +## 项目结构 + +``` +devops-dotnet-demo/ +├── .gitignore # Git 忽略文件配置 +├── LICENSE # 项目许可证 +├── src/ # 源代码目录 +├── tests/ # 测试代码目录 +├── docker-compose.yml # Docker Compose 配置 +├── Dockerfile # Docker 构建文件 +├── azure-pipelines.yml # Azure DevOps 管道配置 +├── Jenkinsfile # Jenkins 管道配置 +└── README.md # 项目说明文档 +``` + +## 使用说明 + +### 运行应用程序 + +```bash +dotnet run --project src/YourProject +``` + +### 运行测试 + +```bash +dotnet test +``` + +### Docker 部署 + +```bash +docker build -t devops-dotnet-demo . +docker run -p 5000:80 devops-dotnet-demo +``` + +## CI/CD 集成 + +本项目已配置多种 CI/CD 工具的支持: + +### Azure DevOps + +项目包含 `azure-pipelines.yml` 文件,可在 Azure DevOps 中自动构建和部署。 + +### Jenkins + +包含 `Jenkinsfile` 用于 Jenkins 流水线的自动化部署。 + +### GitLab CI + +如需在 GitLab 中使用,可添加 `.gitlab-ci.yml` 配置文件。 + +## 贡献指南 + +欢迎对本项目进行贡献!请遵循以下步骤: + +1. Fork 本项目 +2. 创建特性分支 (`git checkout -b feature/AmazingFeature`) +3. 提交更改 (`git commit -m 'Add some AmazingFeature'`) +4. 推送到分支 (`git push origin feature/AmazingFeature`) +5. 创建 Pull Request + +## 许可证 + +本项目采用许可证保护,具体信息请查看 [LICENSE](LICENSE) 文件。 + +## 联系方式 + +- **项目仓库**: https://gitee.com/devopsany/devops-dotnet-demo +- **问题反馈**: 通过 Gitee Issues 提交问题 + +## 注意事项 + +本项目为演示项目,用于展示 DevOps 实践在 .NET 应用程序中的应用。建议根据实际生产环境需求进行相应的调整和优化。 + +--- + +**注意**: 由于当前仓库结构较为简洁,部分目录和功能可能需要根据实际需求进行扩展和补充。建议查看项目中的具体实现代码以了解更多细节。 \ No newline at end of file