Jenkins

Pull

docker pull jenkins/jenkins

compose

docker-compose up -d

version: '3.8'
services:
  jenkins:
    image: jenkins/jenkins:lts
    privileged: true
    user: root
    ports:
     - 8080:8080
     - 50000:50000
    container_name: jenkins
    environment:
      - JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Xmx1024m -XX:MaxPermSize=512m"
    volumes:
      - /Users/${myname}/jenkins_compose/jenkins_configuration:/var/jenkins_home
      - /var/run/docker.sock:/var/run/docker.sock

與Github連結, webhook

  1. Github 的 repository > Settings > Webhooks payload URL 填上你的Jenkins的url, 路徑補上/github-webhook/. 像是 htts://jenkins.kk.yy/github-webhook/

  1. Jenkins上設定觸發

Reference

© Kimi Tsai all right reserved.            Updated : 2023-07-12 09:04:54

results matching ""

    No results matching ""

    results matching ""

      No results matching ""