当前位置:网站首页>Create a devops CI/CD process using the kubesphere GUI
Create a devops CI/CD process using the kubesphere GUI
2022-08-02 11:18:00 【time is an antidote】
使用kubesphereCreate a graphical interfacedevops的CI/CD流程
问题背景
使用kubesphereCreate a graphical interfacedevops的CI/CD流程,It can also be created directly using the documentation on the official website
1 创建凭证
2 安装SonarQube,SonarQube是一种主流的代码质量持续检测工具
helm版本需要为v3
helm version
安装SonarQube
helm upgrade --install sonarqube sonarqube --repo https://charts.kubesphere.io/main -n kubesphere-devops-system --create-namespace --set service.type=NodePort
View all service namespaces,SonarQube端口号为31161
kubectl get svc --all-namespaces
3 登录SonarQube:http://192.168.207.138:31161/
账号:admin
密码:admin
令牌:747504955fa3c7e1bda0c8d24a4d453e626bfe8a
4 fork测试样例:https://github.com/lanedo-Gao/kubesphere-devops-sample
5 在kubesphere中创建流水线
编辑流水线
选择自定义流水线,点击创建
选择node,选择maven
Choose your own test code
添加mavenNested steps,选择shell
mvn clean -gs `pwd`/configuration/settings.xml test
添加mavenNested steps,选择shell
mvn -Dmaven.test.skip=true clean package
再次添加mavenNested steps,选择shell
docker build -f Dockerfile-online -t $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:SNAPSHOT-$BUILD_NUMBER .
Click Add Nested Step again,选择添加凭证
echo "$DOCKER_PASSWORD" | docker login $REGISTRY -u "$DOCKER_USERNAME" --password-stdin
docker push $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:SNAPSHOT-$BUILD_NUMBER
Add a line,Select Save Artifact:target/*.jar
mkdir ~/.kube
echo "$KUBECONFIG_CONTENT" > ~/.kube/config
envsubst < deploy/dev-ol/devops-sample-svc.yaml | kubectl apply -f -
envsubst < deploy/dev-ol/devops-sample.yaml | kubectl apply -f -
作为程序员第 220 篇文章,每次写一句歌词记录一下,看看人生有几首歌的时间,wahahaha …
Lyric: 在有眼泪的雨里
边栏推荐
猜你喜欢
多线程(基础) - 4万字总结
Outsourced Student Management System Architecture Documentation
org.apache.ibatis.binding.BindingException Invalidbound statement (not found)的解决方案和造成原因分析(超详细)
ASP.NET Core 6框架揭秘实例演示[31]:路由&quot;高阶&quot;用法
保姆级教程:写出自己的移动应用和小程序(篇二)
博云入选Gartner中国DevOps代表厂商
LeetCode每日一练 —— 225. 用队列实现栈
ECCV22|PromptDet:无需手动标注,迈向开放词汇的目标检测
Breaking the Boundary, Huawei's Storage Journey
yolo格式(txt)数据集转VOC(xml)
随机推荐
记录代码
Mysql transaction isolation level and MVCC (multi-version concurrency control)
npm WARN deprecated [email protected] This version of tar is no longer supported, and will not receive
OLED的HAL库代码介绍及使用(stm32f1/I2C/HAL库版/100%一次点亮)
【云驻共创】数据工坊平台,0代码开发数据处理业务“快”人一步
从众多接口中脱颖而出的最稳定的接口——淘宝详情api
QT笔记——在一个窗口上显示另外一个透明窗口
MP的几种查询方式
Geoffery Hinton: The Next Big Thing in Deep Learning
5G网络切片技术
循环语句综合练习
Outsourced Student Management System Architecture Documentation
LayaBox---TypeScript---Advanced Type
记一次mysql查询慢的优化历程
微信小程序---组件开发与使用
MySQL模糊查询性能优化
LayaBox---TypeScript---Mixins
从幻核疑似裁撤看如何保证NFT的安全
ssm网页访问数据库数据报错
Excel dynamic chart production