当前位置:网站首页>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: 在有眼泪的雨里
边栏推荐
猜你喜欢
随机推荐
LayaBox---TypeScript---Module Analysis
LayaBox---TypeScript---Advanced Type
循环结构--do-while循环
LayaBox---TypeScript---Symbols
MapStruct
Excel dynamic chart production
5G网络切片技术
mysql清除binlog日志文件
10份重磅报告 — 展望中国数字经济未来
小程序插件让开发者受益的几个理由
突破边界,华为存储的破壁之旅
LeetCode每日一练 —— 225. 用队列实现栈
windbg分析进程卡死
Hub and Spoke配置案例
小程序插件的生态丰富,加速开发建设效率
Breaking the Boundary, Huawei's Storage Journey
LeetCode笔记:Weekly Contest 304
OSI 七层模型和TCP/IP模型及对应协议(详解)
使用kubesphere图形界面创建一个devops的CI/CD流程
情景剧《重走长征路》上演









