본문 바로가기
반응형

Jenkins19

hudson.plugins.git.GitException: Command "git fetch..." returned status code 128: 에러 hudson.plugins.git.GitException: Command "git fetch --tags --force --progress --prune -- origin +refs/heads/develop:refs/remotes/origin/develop" returned status code 128: stdout: stderr: fatal: couldn't find remote ref refs/heads/develop 위 같은 에러가 발생 branch가 없어서 발생하는 에러. git에 알맞은 branch를 jenkins에 넣어주면 됩니다. 2023. 11. 1.
[젠킨스 ssh publishers]ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [-1]] 에러 jar 파일을 ssh publishers 를 통하여 배포한뒤 중지후 재실행하는 스크립트를 작성하였다. 하지만 해당 프로세스를 중지후 실행이 되지 않고 다음과 같은 에러가 발생했다. ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [-1]] 찾아보니 ssh publishers에서는 프로젝트 프로세스를 종료를 하면 젠킨스 프로세스도 같이 종료가 되어버려 종료 shell이후로는 실행이 되지 않아 위 같은 에러가 발생한다. 배포가 자주 발생하는것은 아니라 다시 다른 방식으로 구현하기 번거로워 재실행은 직접하기로 했다. Reference https://juejin.cn/post/6986889033905340.. 2023. 10. 10.
Jenkins 홈 디렉토리 설정 home directory 목차 일반적으로 설치하는 경우 젠킨스의 홈디렉토리는 변경할 필요가 없습니다. 하지만 이동시키거나 폴더를 따로 관리하고 싶은경우에는 별도의 폴더를 홈디렉토리를 하는 경우를 설명드립니다. 일반적인 경우 패키지로 설치할경우 홈디렉토리는 /var/lib/jenkins 입니다. 변경하는 방법은 /etc/default/jenkins (Ubuntu 및 Debian) 또는 /etc/sysconfig/jenkins (CentOS 및 RHEL)에서 설정파일에 JENKINS_HOME 의 변수값을 변경시켜주고 재실행하면 됩니다. WAR로 실행하는경우 설치경로가 제각각이라 보통 유저의 홈디렉토리에 젠킨스 홈디렉토리가 지정됩니다. USER_HOME/.jenkins 보통 .jenkins 폴더에 저장이 되는데 변경하려면 환경변수 설.. 2023. 9. 27.
[Jenkins]Failed to connect to repository : Command "git ls-remote -h -- git@bitbucket.org:abc/example.git HEAD" returned status code 128: 에러 목차 증상 젠킨스에 소스코드 연결하려고 하는데 다음과 같은 에러 발생 (Credentials는 이미 있는상태) Failed to connect to repository : Command "git ls-remote -h -- git@bitbucket.org:abc/example.git HEAD" returned status code 128: stdout: stderr: Resource not found fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 원인 잠시만 생각해 보니 ssh key 등록을 해당 repository에 입력하지 않.. 2023. 9. 15.
[jenkins] bitbucket webhook 설정 목차 webhook 설정은 github이나 gitlab과 비슷할줄 알았으나 마지막에 설정이 자세히 안나와 있어서 개고생을 했네요. bitbuckete webhook 설정하시는 분들이 많은 도움이 되었으면 합니다. 1. api 토큰 생성 먼저 bitbucket에서 jenkins에 접속 할 수 있도록 토큰을 생성해야한다. Dashboard - Jenkins 관리 - Users 에 가면 위와 같이 유저가 있다. 여기서 admin 유저에 커서를 갖다 대면 화살표가 생기는데 클릭후 설정을 들어간다. 위와 같이 API Token이 있는데 Add new Token 을 클릭하면 새토큰이 발급된다. 그것을 복사해 놓습니다. 2. Bitbucket webhook 설정 Bitbucket에서 webhook할 repositor.. 2023. 9. 11.
[jenkins] ssh 사용하여 서버에 원격 배포 하기(+jenkins 설치) 목차 Jenkins 설치 환경: ubuntu 22.04 sudo apt install jenkins 하면 에러가발생함 https://www.oracle.com/java/technologies/downloads/#java17 Download the Latest Java LTS Free Subscribe to Java SE and get the most comprehensive Java support available, with 24/7 global access to the experts. www.oracle.com 여기서 자신의 환경에 맞는 jdk 설치해야함 deb로 설치해도 되지만 이미 설치되어 있는 jdk 버전이 있어서 gz을 받아서 설치하였습니다. 압축을 풀고 나온 파일경로를 복사한뒤 다음처럼 파일 .. 2023. 9. 8.
gradle build 에러 Execution failed for task ':bootJarMainClassName'. > Could not resolve all dependencies for configuration ':detachedConfiguration141'. > Shutdown in progress Gradle 데몬(Daemon) 관련 문제: Gradle은 빌드를 더 빠르게 실행하기 위해 데몬 프로세스를 사용합니다. 종종 데몬이 정상적으로 종료되지 않아 다음 빌드 시도 시 "Shutdown in progress" 오류가 발생할 수 있습니다. 이 경우 다음 명령을 사용하여 데몬을 종료하고 다시 시작할 수 있습니다: arduino gradle --stop gradle clean build 종속성 충돌: 종속성 간에 충돌이 있.. 2023. 6. 23.
Ubuntu jenkins 설치 목차 이전 ec2에 jenkins 설치와 조금 변경된 사항이 있어 환경 ubuntu 22.04 2022.6월 이후 jenkins 버전에서는 java 11이 필요하다고 합니다. java 11 설치 sudo apt install openjdk-11-jdk -y 만약 설치하지 않으면 jenkins 실행시 journalctl -xeu jenkins.service 치고 jenkins: invalid Java version 이라는 에러가 나옵니다. jenkins 설치 key 등록 curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | sudo tee \ /usr/share/keyrings/jenkins-keyring.asc > /dev/null apt rep.. 2023. 5. 2.
jenkins slack 연동(알람 설정) 목차 Slack에서 jenkins CI 추가 및 토큰 생성 채널선택하시고 통합 앱 추가 하시면 됩니다. 여기서 토큰 값을 복사해 놓고 젠킨스의 credentials에 사용할 것입니다. Jenkins에서 slack 설정 Slack 플러그인 설정 설치가능 탭에서 slack을 검색하여 "slack Notification"이 있으면 설치해주시고 안나온다면 설치되어 있다는 의미이므로 넘어갑니다. jenkins 에서 slack 설정 workspace는 슬랙의 워크스페이스 이름을 넣으시면됩니다. credential은 slack에서 jenkins ci 생성하면서 복사해 놓으라는것을 여기에서 사용하게 됩니다. channel은 적용하고 싶은 채널명을 적으시면 됩니다. 여기서 추가가 안될경우 managed credentia.. 2023. 4. 19.
jenkins migration 목차 플러그인을 사용해도 되나 복사가 안되는 것이 있을것 같아서 jenkins home을 통재로 복사하기로했다. 나의 경우는 /var/lib/jenkins 임 새서버에 젠킨스 설치 웬만하면 젠킨스 버전이 같은게 오류날 확률이 적으므로 같은 버전으로 설치하도록 하자 sudo apt-get update sudo apt-cache search openjdk sudo apt-get install openjdk-8-jdk wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add - echo deb https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources... 2023. 4. 3.
[jenkins]Error 403 anonymous is missing the Job/Build permission 원래 하던 url 및 secret code를 입력했는데 웹훅 에러가 발생했다. 인터넷에 보면 위에 URL을 잘못입력했다고 나오는데 이것도 저번이랑 똑같이 입력햇는데 왜이럴까 했는데 jenkins 권한 설정을 도입한것이 저번과의 변경점이라 생각해 Anonymous 에 build 권한을 줬더니 success... 여기서 anonymous 에 job build를 체크해줘야한다. 2022. 12. 22.
jenkins war로 설치 (경로설정) 목차 package 매니저로 설치하면 매우 간단하지만 젠킨스를 여러개 설치하거나 설치경로 사용자 지정할수 없다. 그러기 위해서 war로 설치해보려고 한다. 젠킨스 war 다운로드 https://www.jenkins.io/download/ Jenkins download and deployment Jenkins download and deployment The Jenkins project produces two release lines: Stable (LTS) and regular (Weekly). Depending on your organization's needs, one may be preferred over the other. See the links below for more information .. 2022. 8. 31.
반응형