mgmt/.gitea/workflows/deploy-nomad.yml

43 lines
1.1 KiB
YAML

name: Deploy Nomad Configurations
on:
push:
branches: [ main ]
paths:
- 'nomad-configs/**'
- 'deployment/ansible/**'
workflow_dispatch:
jobs:
deploy-nomad:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Deploy Nomad Server Configurations
run: |
echo "Deploying Nomad server configurations..."
cd nomad-configs
chmod +x scripts/deploy_servers.sh
./scripts/deploy_servers.sh
- name: Deploy Nomad Client Configurations
run: |
echo "Deploying Nomad client configurations..."
cd nomad-configs
chmod +x scripts/deploy.sh
./scripts/deploy.sh
- name: Run Ansible Playbooks
run: |
echo "Running Ansible playbooks..."
cd deployment/ansible
ansible-playbook -i inventories/production/inventory.ini playbooks/configure-nomad-unified.yml
- name: Verify Deployment
run: |
echo "Verifying Nomad cluster status..."
# Add verification steps here
echo "Deployment completed successfully!"