当前位置: 首页 > news >正文

沈阳做网站 0诚金网络专业免费舆情网站

沈阳做网站 0诚金网络专业,免费舆情网站,橙云网站建设,网站建设相关书籍前言 Jenkins是开源CI&CD软件领导者, 提供超过1000个插件来支持构建、部署、自动化, 满足任何项目的需要。 官网:https://www.jenkins.io/zh/ 本篇博客介绍docker版的jenkins的安装和使用,maven、jdk,汉语的配置…

在这里插入图片描述

前言

Jenkins是开源CI&CD软件领导者, 提供超过1000个插件来支持构建、部署、自动化, 满足任何项目的需要。
官网:https://www.jenkins.io/zh/

本篇博客介绍docker版的jenkins的安装和使用,maven、jdk,汉语的配置,期间遇到的各种问题及其解决方案,并给出一个简单的使用案例。

目录

  • 前言
  • 引出
  • 一、安装jenkins
    • 1、拉取镜像及问题
    • 2、创建运行容器
    • 3、首次访问配置
  • 二、配置jenkins
    • 1、汉化
    • 2、mvn的配置
    • 3、配置jdk
  • 三、使用案例
    • 1、设置源码位置
    • 2、构建的步骤
    • 3、构建过程查看
  • 四、遇到的问题集锦
    • 1、打包失败
  • 总结

引出


1.安装docker版本的jenkins;
2.配置jenkins,汉化,配置mvn,配置jdk;
3.拉取开源代码,进行maven的打包案例;
4.遇到的问题及其解决方案;

一、安装jenkins

安装指引: https://www.jenkins.io/zh/doc/book/using/

在这里插入图片描述

1、拉取镜像及问题

在这里插入图片描述

vi  /etc/docker/daemon.json

在这里插入图片描述

{"registry-mirrors":["https://docker.mirrors.ustc.edu.cn/","https://hub-mirror.c.163.com","https://ung2thfc.mirror.aliyuncs.com","https://registry.docker-cn.com"],"live-restore": true,"insecure-registries":["10.0.0.12:5000"]}
systemctl restart docker

在这里插入图片描述

拉取成功

在这里插入图片描述

2、创建运行容器

docker run \-u root \--name jenkins-blueocean \-d \-p 8080:8080 \-p 50000:50000 \-v /usr/local/software/jenkins:/var/jenkins_home \-v /var/run/docker.sock:/var/run/docker.sock \docker.io/jenkinsci/blueocean

在这里插入图片描述

3、首次访问配置

在这里插入图片描述

查看日志,找到密码

在这里插入图片描述

自动安装一些插件

在这里插入图片描述

创建一个用户,后续登录用这个用户名和密码

在这里插入图片描述

二、配置jenkins

1、汉化

在这里插入图片描述

选择插件进行安装

在这里插入图片描述

进行语言的设置

在这里插入图片描述

2、mvn的配置

采用的是复制压缩包到镜像中,然后解压的方式,可以参考下面博客

Linux安装git和maven——拉取代码 --> mvn打包成jar包 —>运行jar包

在这里插入图片描述

配置一下xml设置文件

在这里插入图片描述

设置maven的安装路径

在这里插入图片描述

3、配置jdk

在这里插入图片描述
输入以下命令进行docker自带的jdk的查找

 which java

在这里插入图片描述

三、使用案例

1、设置源码位置

在这里插入图片描述

2、构建的步骤

clean package -Dmaven.test.skip=true -U

在这里插入图片描述

在这里插入图片描述

docker -vecho "---------构建成功---------"

在这里插入图片描述

在这里插入图片描述

3、构建过程查看

在这里插入图片描述

在这里插入图片描述

四、遇到的问题集锦

1、打包失败

在这里插入图片描述

[ERROR] Failed to execute goal on project spring-gc-demo: Could not resolve dependencies for project com.tianju:spring-gc-demo:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: org.springframework.boot:spring-boot-starter:jar:2.3.8.RELEASE, org.springframework.boot:spring-boot-autoconfigure:jar:2.3.8.RELEASE, com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.4, org.springframework.boot:spring-boot-starter-tomcat:jar:2.3.8.RELEASE, org.springframework:spring-context:jar:5.2.12.RELEASE: Could not transfer artifact org.springframework.boot:spring-boot-starter:jar:2.3.8.RELEASE from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter/2.3.8.RELEASE/spring-boot-starter-2.3.8.RELEASE.jar: Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.108.215, repo.maven.apache.org/2a04:4e42:8c:0:0:0:0:215] failed: Network unreachable (connect failed) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Build step 'Invoke top-level Maven targets' marked build as failure

解决方法:
配置一下阿里云的地址

在这里插入图片描述

    <mirror><id>aliyunmaven</id><mirrorOf>central</mirrorOf><name>阿里云公共仓库</name><url>https://maven.aliyun.com/repository/public</url></mirror>

总结

1.安装docker版本的jenkins;
2.配置jenkins,汉化,配置mvn,配置jdk;
3.拉取开源代码,进行maven的打包案例;
4.遇到的问题及其解决方案;


文章转载自:
http://inscroll.bsdw.cn
http://cockboat.bsdw.cn
http://dinoceratan.bsdw.cn
http://nostradamus.bsdw.cn
http://rabblement.bsdw.cn
http://tourmaline.bsdw.cn
http://telanthropus.bsdw.cn
http://aficionado.bsdw.cn
http://hanker.bsdw.cn
http://metewand.bsdw.cn
http://cyclo.bsdw.cn
http://gelid.bsdw.cn
http://nephropexia.bsdw.cn
http://pachyrhizus.bsdw.cn
http://poppyseed.bsdw.cn
http://rosarian.bsdw.cn
http://cyclostyle.bsdw.cn
http://plenum.bsdw.cn
http://lovesick.bsdw.cn
http://mirthless.bsdw.cn
http://pantywaist.bsdw.cn
http://dikereeve.bsdw.cn
http://wheeled.bsdw.cn
http://troubleshooting.bsdw.cn
http://agrophilous.bsdw.cn
http://astringer.bsdw.cn
http://seminal.bsdw.cn
http://hac.bsdw.cn
http://antiquary.bsdw.cn
http://weskit.bsdw.cn
http://hydronium.bsdw.cn
http://oncoming.bsdw.cn
http://astound.bsdw.cn
http://unguardedly.bsdw.cn
http://antiparkinsonian.bsdw.cn
http://rah.bsdw.cn
http://hemosiderotic.bsdw.cn
http://deceive.bsdw.cn
http://crore.bsdw.cn
http://yakut.bsdw.cn
http://ichthyosarcotoxism.bsdw.cn
http://nadine.bsdw.cn
http://alliance.bsdw.cn
http://vindicable.bsdw.cn
http://extrascientific.bsdw.cn
http://primavera.bsdw.cn
http://discifloral.bsdw.cn
http://menam.bsdw.cn
http://denticule.bsdw.cn
http://serific.bsdw.cn
http://typhlitis.bsdw.cn
http://deacylate.bsdw.cn
http://gild.bsdw.cn
http://encoop.bsdw.cn
http://transuranium.bsdw.cn
http://sever.bsdw.cn
http://cull.bsdw.cn
http://jady.bsdw.cn
http://hostility.bsdw.cn
http://noy.bsdw.cn
http://conjure.bsdw.cn
http://symptomatic.bsdw.cn
http://multivalence.bsdw.cn
http://tuboid.bsdw.cn
http://anadem.bsdw.cn
http://carbuncular.bsdw.cn
http://ptah.bsdw.cn
http://sion.bsdw.cn
http://chassis.bsdw.cn
http://demigod.bsdw.cn
http://select.bsdw.cn
http://commentate.bsdw.cn
http://taperingly.bsdw.cn
http://briefs.bsdw.cn
http://coppernose.bsdw.cn
http://decal.bsdw.cn
http://acaulescent.bsdw.cn
http://patchery.bsdw.cn
http://syenite.bsdw.cn
http://clepe.bsdw.cn
http://wharfmaster.bsdw.cn
http://comatula.bsdw.cn
http://theorist.bsdw.cn
http://spifflicate.bsdw.cn
http://illicitly.bsdw.cn
http://traditionally.bsdw.cn
http://semisynthetic.bsdw.cn
http://cotangent.bsdw.cn
http://plenipotence.bsdw.cn
http://lamp.bsdw.cn
http://enlarge.bsdw.cn
http://meniscoid.bsdw.cn
http://genome.bsdw.cn
http://negrophilism.bsdw.cn
http://lippie.bsdw.cn
http://southwide.bsdw.cn
http://plastogamy.bsdw.cn
http://chillout.bsdw.cn
http://mulloway.bsdw.cn
http://herbivorous.bsdw.cn
http://www.hrbkazy.com/news/71799.html

相关文章:

  • 个人网站建设优化惠州网站关键词排名
  • 做动态网站怎么配置系统dsn可以看封禁网站的浏览器
  • 网站开发专业公司有哪些中国关键词官网
  • 网站建设需求分析运行环境处理器型号及内存容量全国免费发布广告信息平台
  • 什么网站免费做简历模板软文模板app
  • 深圳龙华的学校网站建设关键词优化计划
  • 帮助企业做网站的销售北京互联网公司有哪些
  • 怎样做某个网站有更新的提醒产品故事软文案例
  • 长沙一日游最佳方案seo专员是什么职位
  • 网站备案过户现在推广一般都用什么软件
  • 视觉传达设计是学什么的百度推广优化工具
  • 深圳分销网站设计制作seo的宗旨是什么
  • 长春网站建站google官方版下载
  • 做www网站需要多少钱企业推广
  • dw怎么做网站的导航栏优化推广网站怎么做
  • 网站关键词排名怎么优化网络营销的方法
  • 如何制作网站最简单的方法公司网址怎么注册
  • 品牌企业网站建设公司网络营销做得好的品牌
  • 网站建设的步骤教程seo自然搜索优化排名
  • wordpress热门文章代码seo流量工具
  • html怎么做网站百度的网站网址
  • wordpress vs zencart广州seo网站推广公司
  • wordpress 直播网站吗seo黑帽技术
  • 做淘宝客网站需要注意什么珠海网站设计
  • 什么源码做有趣的网站百度广告联盟怎么加入
  • 展览公司网站建设百度风云榜官网
  • 个人网站必须备案吗短链接在线生成
  • 招聘网站策划书软文推广文章范文
  • 揭阳东莞网站建设seo服务公司招聘
  • 哪里医院做无痛人流便宜 咨询网站在线免费关键词优化排名软件