Add NAS CI demo
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# NAS CI/CD Demo
|
||||
|
||||
This is a tiny project for testing the NAS Gitea + Woodpecker + Registry flow.
|
||||
|
||||
Expected pipeline:
|
||||
|
||||
1. Push this repository to Gitea.
|
||||
2. Enable the repository in Woodpecker.
|
||||
3. Woodpecker runs `.woodpecker.yml`.
|
||||
4. The pipeline builds an nginx image.
|
||||
5. The image is pushed to the NAS Registry as:
|
||||
|
||||
```text
|
||||
localhost:5050/cicd-demo:latest
|
||||
```
|
||||
|
||||
## Push To Gitea
|
||||
|
||||
Create an empty repository named `cicd-demo` in Gitea first, then run:
|
||||
|
||||
```bash
|
||||
git init
|
||||
git add .
|
||||
git commit -m "Add CI demo"
|
||||
git branch -M main
|
||||
git remote add origin http://10.26.238.251:3000/<your-gitea-user>/cicd-demo.git
|
||||
git push -u origin main
|
||||
```
|
||||
|
||||
Replace `<your-gitea-user>` with your Gitea username.
|
||||
|
||||
## Verify The Built Image On NAS
|
||||
|
||||
After the Woodpecker build succeeds, run this on the NAS:
|
||||
|
||||
```bash
|
||||
docker pull localhost:5050/cicd-demo:latest
|
||||
docker rm -f cicd-demo-web 2>/dev/null || true
|
||||
docker run -d --name cicd-demo-web -p 18080:80 localhost:5050/cicd-demo:latest
|
||||
```
|
||||
|
||||
Open:
|
||||
|
||||
```text
|
||||
http://10.26.238.251:18080
|
||||
```
|
||||
Reference in New Issue
Block a user