002-Devops Practice-Jenkins,Maven
2022/9/11 6:23:11
本文主要是介绍002-Devops Practice-Jenkins,Maven,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
- install jenkins
https://www.jenkins.io/download/
https://hub.docker.com/r/jenkins/jenkins/tags?page=1&name=2.361.1
[root@devops ~]# docker pull jenkins/jenkins:2.361.1-lts [root@devops ~]# cat devops/jenkins/docker-compose.yaml version: '3.3' services: jenkins: image: jenkins/jenkins:2.361.1-lts restart: unless-stopped privileged: true user: root ports: - 8080:8080 container_name: jenkins volumes: - /root/devops/jenkins:/var/jenkins_home - /var/run/docker.sock:/var/run/docker.sock - /usr/bin/docker:/usr/bin/docker [root@devops ~]# cd devops/jenkins/ && docker-compose up -d [root@devops jenkins]# docker-compose logs [root@devops ~]# docker exec -it jenkins cat /var/jenkins_home/secrets/initialAdminPassword 104544c40af646a3958275f8c5edef04
After setup complete,then install plugin: Publish Over SSH
Git Parameter
Kubernetes
- install maven
https://maven.apache.org/download.cgi
[root@devops devops]# wget https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz [root@devops devops]# tar -zxvf apache-maven-3.8.6-bin.tar.gz && mv apache-maven-3.8.6 maven [root@devops devops]# vim maven/conf/settings.xml # appends below settings to xml file <mirrors> <mirror> <id>aliyunmaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>https://maven.aliyun.com/repository/public </url> </mirror> </mirrors> <profile> <id>jdk8</id> <activation> <activeByDefault>true</activeByDefault> <jdk>1.8</jdk> </activation> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> </properties> </profile> <activeProfiles> <activeProfile>jdk8</activeProfile> </activeProfiles> # we will need maven in jenkins later
- install Jdk1.8
https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html
[root@devops devops]# wget https://download.oracle.com/otn/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-linux-x64.tar.gz?AuthParam=1662820870_bc2da312076fc5255286e57081c6a475 [root@devops devops]# tar -zxvf jdk-8u202-linux-x64.tar.gz && mv jdk1.8.0_202 jdk8 # We will need jdk in jenkins later as well [root@devops devops]# mv maven/ jdk8/ jenkins/ # move maven and jdk to jenkins home, jdk and maven can be found from jenkins dashboard
这篇关于002-Devops Practice-Jenkins,Maven的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-12如何创建可引导的 ESXi USB 安装介质 (macOS, Linux, Windows)
- 2024-11-08linux的 vi编辑器中搜索关键字有哪些常用的命令和技巧?-icode9专业技术文章分享
- 2024-11-08在 Linux 的 vi 或 vim 编辑器中什么命令可以直接跳到文件的结尾?-icode9专业技术文章分享
- 2024-10-22原生鸿蒙操作系统HarmonyOS NEXT(HarmonyOS 5)正式发布
- 2024-10-18操作系统入门教程:新手必看的基本操作指南
- 2024-10-18初学者必看:操作系统入门全攻略
- 2024-10-17操作系统入门教程:轻松掌握操作系统基础知识
- 2024-09-11Linux部署Scrapy学习:入门级指南
- 2024-09-11Linux部署Scrapy:入门级指南
- 2024-08-21【Linux】分区向左扩容的方法