DevOps/Jenkins
[Jenkins] jenkins 로컬시간 변경하기
기록하는 백앤드개발자
2022. 10. 24. 17:59
반응형
ㅁ 개요
ㅇ 젠킨스의 타임 존을 설정하는 방법을 정리하였다.
ㅇ 사용자별 설정, JAVA Option, Jenkins Script Console으로 설정하는 방법이 있다.
ㅁ 사용자별 설정
ㅇ 사람들 > 사용자 > 설정으로 이동하면 사용자별 타임존을 설정할 수 있다.
ㅁ Java system property
java -Dorg.apache.commons.jelly.tags.fmt.timeZone=Asia/Seoul ...
ㅇ 젠킨스가 jvm으로 실행되기에 위와 같이 젠킨스 실행 시 jvm option을 줄 수 있다.
ㅇ kubernetes 환경에서 deploy를 수정하여 jvm option을 추가하였다.
ㅁ Jenkins Script Console
System.setProperty('org.apache.commons.jelly.tags.fmt.timeZone', 'Asia/Seoul')
ㅇ 젠킨스 스크립트 콘솔에서 위의 구문을 실행하여 타임존을 적용할 수 있다.
ㅁ 함께 보면 좋은 사이트
Change System Time Zone
The system time zone configuration is the default time zone displayed by Jenkins. The "Manage Jenkins" ⇒ "System Information" page shows the value of the system properties that define the time zone for the Jenkins controller. Refer to the following video
www.jenkins.io
반응형