---
# System prepended metadata

title: webhook觸發jenkins job流程
tags: ["jenkins\_"]

---

# webhook觸發jenkins job流程

- 起ngrok為8080 port的jenkins server取得公開url
    :::spoiler ngrok安裝
    ```
    wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz
    tar -xvzf ~/ngrok-v3-stable-linux-amd64.tgz -C ~
    ```
    :::
    ```=bash
    ~/ngrok http 8080
    ```
![image](https://hackmd.io/_uploads/BylFLT-Sp.png)
- 先於jenkins server中安裝gitea plugin
    :::spoiler 
    ![image](https://hackmd.io/_uploads/H1V_DpbST.png)
    :::
- 接著於gitea的repo中設定webhook
    ![image](https://hackmd.io/_uploads/ByerOTbSa.png)

    ```
    http://b69f-61-222-146-139.ngrok.io/gitea-webhook/post
    ```