Github io & Jenkins 자동 배포

Z6su3·2022년 3월 21일
0

New Github Repository


  • Create Github repository
    - github-pages

  • gh-pages Install

    • npm install gh-pages --save-dev
  • package.json

  • npm run deploy



Jenkins


  • Jenkins Install for window, LTS
    • port 9999 set (example)
    • port open
      • Windows Defender → Advance Setting → Inbound Rules → New Rules

    • install sugest plugins
  • github Access Token
    • profile → Settings → Developer settings
    • Personal access tokens → new
      • Note, Select scopes
      • Generate and copy token
  • Chain of Jenkins and Github
    • Jenkins settings → System Setting

    • Github → Add Github Server


    • Credential Add → Jenkins

      • Domain : Global credentials (unrestricted)
      • Kind : Username with password
      • Scope : Global
      • UserName : github user name
      • password : Github personal Access Token
      • ID : Your Id
    • Test connection

    • Save

  • New Item → FreeStyle Projects
    • General → Github project → Project Url
    • Source Code → Git → Repository url
      • Your github project turl.git
    • Build → Excute Windows batch command
      • write on npm run deploy
    • Save

Github Webhook - jenkins build


  • Github Webhook Add
  • Jenkins Plugin → Github Integeration Plugin
    • (Github BlueOcean), Github Integration Install
  • Jenkins Project → Settings
    • Build Triggers (Build periodically) → Github hook trigger for GITScm polling Check
profile
기억은 기록을 이길수 없다

0개의 댓글