Archive for the ‘continuous_delivery’ Category

jenkins – change user id to include dot(.) char

2018/05/24

add init.groovy.d/init.groovy

// SECURITY-786 change user id to include dot(.) char // default : /^[\w-]+$
hudson.security.HudsonPrivateSecurityRealm.ID_REGEX=/^[\w-\.]+$/

notice : hudson.model.HudsonPrivateSecurityRealm.ID_REGEX (X)

 

Advertisements

jenkins NullPointerException MultiSCM

2018/05/15
  • error log

Reason: java.lang.NullPointerException: Descriptor list is null for context ‘class com.cloudbees.hudson.plugins.folder.Folder’
in thread ‘Handling GET /job/XXX/configure from XXX.XX.X.X :
RequestHandlerThread[#8] AbstractFolder/configure.jelly FolderLibraries/DescriptorImpl/config.jelly LibraryConfiguration/config.jelly
SCMRetriever/DescriptorImpl/config.jelly MultiSCM/DescriptorImpl/config.jelly’
jenkins_1 | java.lang.NullPointerException: Descriptor list is null for context

  • cause
    • multiple-scm.jpi it is derecated plugin.
  • solution
    • remove multiple-scm.jpi then, restart jenkins

jenkins node secret 정보 확인하기

2018/04/09

jenkins에서 신규 slave node를 만든 뒤 slave에서 추가해야 하는 secret 값을 jenkins master에서 확인하기 위한 방법

script console에서 실행..

  1. 모든 Node의 secret 정보 조회
for (aSlave in hudson.model.Hudson.instance.slaves)
{
println aSlave.name + "," + aSlave.getComputer().getJnlpMac()
}

2. 특정 Node 의 secret 정보 조회


def nodeName = "qa-test-slave"
hudson.model.Hudson.instance.slaves.find(){ it.name == nodeName }.computer.jnlpMac

jenkins install with centOS virtualbox

2015/11/23

/// Virtual Box 에서 생성한 Linux Cent OS 에 Jenkins install 하기 …

  1. virtualbox 생성

CentOS 7.1

2. jenkins install
// http://starkapin.tistory.com/529

yum install wget
wget -O /etc/yum.repos.d/jekins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm -import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
yum install jenkins // install

3. jenkins setting , execute
service jenkins start/stop/restart  // 실행, 종료, 재시작
chkconfig jenkins on // 부팅시 자동실행

config : /etc/sysconfig/jenkins
home : /var/lib/jenkins ( from config)
logs : /var/log/jenkins

4. port open
// 8080 추가
iptables -A INPUT -p tcp –dport 8080 -j ACCEPT
// iptable flush
iptables -F

5. virtual box port mapping
VirtualBox Manager 실행
target os > 설정 > Network > Port Forwarding
name TCP 127.0.0.1 hostport (8084) , guestport 8080

6. 접속
http://localhost:8084/