pipeline {
agent any
stages {
stage('Checkout') {
steps {
checkout scmGit(branches: [[name: '{check_branch}']],
userRemoteConfigs: [[url: '{my_github_project_repository-url}']])
}
}
}
}

is not supported because it isn't reachable over the public Internet (localhost)
1. 로컬에서 빌드를 포기
- 배포 환경(EC2 Instance)에서 Jenkins실행 시 시간이 많이 소요되고, 특정 script는 시간이 많이 소요되서 실패하는 경우가 생김
- 원래 배포 환경에서 Jenkins를 실행하다가 로컬 환경으로 바꾼거라 바꾸고 싶지 않음
2. 로컬 서버를 임시 퍼블릭 IP로 노출
- 그래서 찾은 방법이 로컬 서버를 임시 퍼블릭 IP로 노출시켜 GitHub에 등록할 수 있도록 하는 것
https://cordcat.tistory.com/105
해당 포스팅에 자세히 나와있습니다


#!/bin/bash
Ngrok 실행
ngrok http 8080 &
Ngrok URL 가져오기
NGROK_URL=$(curl -s http://127.0.0.1:4040/api/tunnels | jq -r '.tunnels[0].public_url')
GitHub Webhook URL 업데이트
curl -X PATCH -H "Authorization: token YOUR_GITHUB_TOKEN" -d "{\"config\": {\"url\": \"$NGROK_URL\"}}" https://api.github.com/repos/yourusername/yourrepo/hooks/YOUR_HOOK_ID
authtoken: YOUR_AUTH_TOKEN
tunnels:
web:
proto: http
addr: 8080
subdomain: customname