brew install jenkins
# 禁用自动启动
brew services stop jenkins
brew services remove jenkins
# 手动启动
brew services start jenkins
docker pull jenkins/jenkins:lts-jdk17
docker stop jenkins
docker rm jenkins
docker run -d -uroot -p 9095:8080 -p 50000:50000 \
--hostname jenkins.marstau.com \
--name jenkins \
-v ~/softwares/docker/jenkins:/var/jenkins_home \
-v /etc/localtime:/etc/localtime \
jenkins/jenkins:lts-jdk17
# wait for a minute, get password
docker logs jenkins
# Organization and Administration
Dashboard View
Folders
# Build Features
Build Name and Description Setter
Config File Provider
Credentials Binding
Embeddable Build Status
Rebuilder
SSH Agent
Timestamper
Workspace Cleanup
# Build Tools
Gradle
# Pipelines and Continuous Delivery
Pipeline
GitHub Branch Source
Pipeline: GitHub Groovy Libraries
Pipeline: Stage View
Conditional BuildStep
Parameterized Trigger
# Source Code Management
Git
# Distributed Builds
Matrix Project
SSH Build Agents
# User Management and Security
Matrix Authorization Strategy
LDAP
Publish Over SSH
ssh key
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
编译其他jenkins流程
stage('编译服务器地图') {
build 'xz_server_update_map'
}
H 8,12 * * *
jenkins脚本pipeline生成
HTTP ERROR 404 Not Found
after installation on mac默认8080端口可能被占用 使用8888
# 使用which jenkins找到jenkins安装路径修改此文件的port
/opt/homebrew/Cellar/jenkins/2.395/homebrew.mxcl.jenkins.plist
jenkins。Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
在System Infomation中找到JAVA_HOME,在对应的node的JavaPath中填入这个路径/opt/homebrew/Cellar/openjdk@17/17.0.6/libexec/openjdk.jdk/Contents/Home/bin/java
git push http://user:pwd@xx.com/domain/project.git HEAD:${params.branch}