jenkins 常见操作

2019-02-27  本文已影响0人  akka9

使用war 包启动

test -f /etc/init.d/functions && . /etc/init.d/functions

daemon --user jenkins /usr/java/jdk1.8.0_202/bin/java \
  -DJENKINS_HOME=/data0/data/jenkinsv2/data \
  -jar jenkins.war --prefix=/jenkins --httpPort=9090 \
  --logfile=/data0/data/jenkinsv2/logs/jenkins.log

常用插件

JDK Parameter
LDAP Plugin
Matrix Authorization Strategy
Build With Parameters
Git Parameter
Email Extension Template
Publish Over CIFS
Folders
Folder-based Authorization Strategy
Environment Script
Build Name and Description Setter
Run Condition
Dashboard View

View Job Filters

Generic Webhook Trigger

忘记密码 修改 config.xml

<useSecurity>true</useSecurity>  修改成  <useSecurity>false</useSecurity>

重启 jenkins 之后可以匿名登录。

修改 uri prefix

JENKINS_ARGS="--prefix=/homejenkins "

修改 workspace 和 build 的上级目录

JENKINS_HOME=/data/jenkins/data

mkdir -p $JENKINS_HOME
chown jenkins:jenkins $JENKINS_HOME
rsync -Pav /var/lib/jenkins/ $JENKINS_HOME/

vim /etc/sysconfig/jenkins
JENKINS_HOME=/data/jenkins/data

restart jenkins

修改 jenkins user

JENKINS_USER="nobody"

参考:

https://github.com/naxhh/jenkins-php-docker
https://blog.couchbase.com/create-continuous-deployment-pipeline-golang-jenkins/

上一篇下一篇

猜你喜欢

热点阅读