Fix labeling of runners
Some checks are pending
CI/CD Pipeline (Fully Isolated DinD) / Run Tests (DinD) (push) Waiting to run
CI/CD Pipeline (Fully Isolated DinD) / Build and Push Docker Images (DinD) (push) Blocked by required conditions
CI/CD Pipeline (Fully Isolated DinD) / Deploy to Production (push) Blocked by required conditions
Some checks are pending
CI/CD Pipeline (Fully Isolated DinD) / Run Tests (DinD) (push) Waiting to run
CI/CD Pipeline (Fully Isolated DinD) / Build and Push Docker Images (DinD) (push) Blocked by required conditions
CI/CD Pipeline (Fully Isolated DinD) / Deploy to Production (push) Blocked by required conditions
This commit is contained in:
parent
080bb12630
commit
ce89117aa6
2 changed files with 14 additions and 14 deletions
|
@ -14,7 +14,7 @@ jobs:
|
|||
# Job 1: Testing - Uses DinD with multiple containers for comprehensive testing
|
||||
test:
|
||||
name: Run Tests (DinD)
|
||||
runs-on: [self-hosted, dind]
|
||||
runs-on: [self-hosted, ci]
|
||||
if: github.ref == 'refs/heads/main'
|
||||
|
||||
steps:
|
||||
|
@ -84,7 +84,7 @@ jobs:
|
|||
build-and-push:
|
||||
name: Build and Push Docker Images (DinD)
|
||||
needs: [test]
|
||||
runs-on: [self-hosted, dind]
|
||||
runs-on: [self-hosted, ci]
|
||||
if: github.ref == 'refs/heads/main'
|
||||
|
||||
steps:
|
||||
|
@ -151,7 +151,7 @@ jobs:
|
|||
deploy:
|
||||
name: Deploy to Production
|
||||
needs: build-and-push
|
||||
runs-on: [self-hosted, production]
|
||||
runs-on: [self-hosted, prod]
|
||||
if: github.ref == 'refs/heads/main'
|
||||
|
||||
steps:
|
||||
|
|
|
@ -1017,8 +1017,8 @@ cd ~
|
|||
forgejo-runner register \
|
||||
--instance https://your-forgejo-instance \
|
||||
--token YOUR_REGISTRATION_TOKEN \
|
||||
--name "ci-cd-dind-runner" \
|
||||
--labels "ubuntu-latest,docker,dind" \
|
||||
--name "ci-runner" \
|
||||
--labels "ci" \
|
||||
--no-interactive
|
||||
```
|
||||
|
||||
|
@ -1115,12 +1115,12 @@ sudo journalctl -u forgejo-runner.service -f --no-pager
|
|||
|
||||
# Verify runner appears in Forgejo
|
||||
# Go to your Forgejo repository → Settings → Actions → Runners
|
||||
# You should see your runner listed as "ci-cd-dind-runner" with status "Online"
|
||||
# You should see your runner listed as "ci-runner" with status "Online"
|
||||
```
|
||||
|
||||
**Expected Output**:
|
||||
- `systemctl status` should show "active (running)"
|
||||
- Forgejo web interface should show the runner as online
|
||||
- Forgejo web interface should show the runner as online with "ci" label
|
||||
|
||||
**If something goes wrong**:
|
||||
- Check logs: `sudo journalctl -u forgejo-runner.service -f`
|
||||
|
@ -1649,7 +1649,7 @@ forgejo-runner register \
|
|||
--instance https://your-forgejo-instance \
|
||||
--token YOUR_REGISTRATION_TOKEN \
|
||||
--name "production-runner" \
|
||||
--labels "production,ubuntu-latest,docker" \
|
||||
--labels "prod" \
|
||||
--no-interactive
|
||||
|
||||
# Copy configuration to system location
|
||||
|
@ -1707,9 +1707,9 @@ sudo journalctl -u forgejo-runner.service -f --no-pager
|
|||
|
||||
**Expected Output**:
|
||||
- `systemctl status` should show "active (running)"
|
||||
- Forgejo web interface should show the runner as online with "production" label
|
||||
- Forgejo web interface should show the runner as online with "prod" label
|
||||
|
||||
**Important**: The CI/CD workflow (`.forgejo/workflows/ci.yml`) is already configured to use this production runner. The deploy job runs on `runs-on: [self-hosted, production]`, which means it will execute on any runner with the "production" label. When the workflow runs, it will:
|
||||
**Important**: The CI/CD workflow (`.forgejo/workflows/ci.yml`) is already configured to use this production runner. The deploy job runs on `runs-on: [self-hosted, prod]`, which means it will execute on any runner with the "prod" label. When the workflow runs, it will:
|
||||
|
||||
1. Pull the latest Docker images from Harbor registry
|
||||
2. Use the `docker-compose.prod.yml` file to deploy the application stack
|
||||
|
@ -1826,8 +1826,8 @@ sudo su - DEPLOY_USER
|
|||
forgejo-runner register \
|
||||
--instance https://your-forgejo-instance \
|
||||
--token YOUR_TOKEN \
|
||||
--name "ci-cd-dind-runner" \
|
||||
--labels "ubuntu-latest,docker,dind" \
|
||||
--name "ci-runner" \
|
||||
--labels "ci" \
|
||||
--no-interactive
|
||||
```
|
||||
|
||||
|
@ -1849,12 +1849,12 @@ sudo journalctl -u forgejo-runner.service -f --no-pager
|
|||
|
||||
# Verify runner appears in Forgejo
|
||||
# Go to your Forgejo repository → Settings → Actions → Runners
|
||||
# You should see your runner listed as "ci-cd-dind-runner" with status "Online"
|
||||
# You should see your runner listed as "ci-runner" with status "Online"
|
||||
```
|
||||
|
||||
**Expected Output**:
|
||||
- `systemctl status` should show "active (running)"
|
||||
- Forgejo web interface should show the runner as online
|
||||
- Forgejo web interface should show the runner as online with "ci" label
|
||||
|
||||
### Step 22: Set Up Monitoring and Cleanup
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue