kubesphere-devops环境-修改maven源到阿里云

文章目录


前言

使用kubesphere搭建了devops环境,但是在构建maven的时候,发现使用的是官方的镜像,修改为阿里云的mirrors


一、maven配置文件在kubesphere中的位置

地址:http://IP:PORT/clusters/default/projects/kubesphere-devops-worker/configmaps/ks-devops-agent

二、修改configmap,增加阿里源信息

增加之后,保存configmap

xml 复制代码
  <!-- mirrors
   | This is a list of mirrors to be used in downloading artifacts from remote repositories.
   |
   | It works like this: a POM may declare a repository to use in resolving certain artifacts.
   | However, this repository may have problems with heavy traffic at times, so people have mirrored
   | it to several places.
   |
   | That repository definition will have a unique id, so we can create a mirror reference for that
   | repository, to be used as an alternate download site. The mirror site will be the preferred
   | server for that repository.
   |-->
<mirrors>
    <!--  这里设置的是阿里公共代理仓库  -->
    <mirror>
        <!-- 镜像的唯一标识符,用来区分不同的镜像  -->
        <id>aliyunmaven</id>
        <!-- 镜像名称  -->
        <name>阿里云公共仓库</name>
        <!-- 镜像的URL地址 -->
        <url>https://maven.aliyun.com/repository/public</url>
        <!--   设置被代理的maven远程仓库ID,*表示匹配所有请求,即所有发送到远程仓库的请求都会被拦截,   
               并将请求重定向到<url>标签设置的代理仓库地址
               如果同时设置了多个代理镜像,精确匹配优先级>通配符匹配
               如果为同一个仓库设置了多个代理镜像,则默认会选择第一个(即写在最前面的镜像)
        -->
        <mirrorOf>*</mirrorOf>
    </mirror>
</mirrors>

总结

由于使用的是kubesphere的devops,所以还是要按照kubesphere的方式来修改。

相关推荐
无限大.8 分钟前
为什么“DevOps“能提高软件开发效率?——从开发到运维的融合
linux·运维·devops
咕噜企业分发小米1 小时前
阿里云和华为云在AI教育领域有哪些技术竞争?
人工智能·阿里云·华为云
咕噜企业分发小米1 小时前
阿里云和华为云在AI教育领域有哪些技术挑战?
人工智能·阿里云·华为云
hk11241 小时前
【Architecture/Refactoring】2026年度企业级遗留系统重构与高并发架构基准索引 (Grandmaster Edition)
数据结构·微服务·系统架构·数据集·devops
jasnet_u1 小时前
nexus3私服使用及setting.xml配置
maven·nexus
黛玉晴雯子0012 小时前
Devops基础之Jenkins持续集成工具(持续更新)
ci/cd·jenkins·devops
CryptoRzz3 小时前
印度交易所 BSE 与 NSE 实时数据 API 接入指南
java·c语言·python·区块链·php·maven·symfony
咕噜企业分发小米3 小时前
阿里云和华为云AI教育产品有哪些创新功能?
人工智能·阿里云·华为云
咕噜企业分发小米3 小时前
阿里云和华为云在AI领域有哪些合作案例?
人工智能·阿里云·华为云