Jenkins 프로젝트 설정 방법 - linewalks/dev-common GitHub Wiki

개요

  • lw-jenkins를 라이브러리로 이용합니다.
  • 각 Repository별로 폴더를 하나씩 만듭니다.
    • 해당 폴더 밑에 용에 따라서 배포, 테스트 등으로 나눕니다.
  • Project Name
    • Repository Name을 소문자화하고 dash(-)를 underscore(_)로 바꾼 것을 Project Name이라고 칭합니다.
    • 예: LW-Jenkins -> lw_jenkins
  • Back-end API Server
    • 내부 자동 배포 (develop, main)
    • 자동 테스트 (모든 branch)
    • 테스트 커버리지 추출 (develop)

공통

Global Properties 설정

  • 새로 Jenkins 세팅할때만 해당
  • Manage Jenkins > Configure System > Global properties
    • DOCKER_REGISTRY_URL
    • 내부 도커 레지스트리 URl 설정 예: http://192.168.0.21:5000

Folder Properties 설정

  • 해당 Folder > Configure > Folder Properties

  • REPO_URL

    • 해당 프로젝트의 repository URL

라이브러리 import

@Library('Google-Chat-Notification') _gcn
@Library('lw-jenkins') _lw

Back-end API Server