Pipeline branch filters and PR bases, Flux GitRepository ref, image automation checkout and push, restore-test, vmtest and bootstrap.sh. Merge right before the master -> main rename. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
1.3 KiB
YAML
37 lines
1.3 KiB
YAML
when:
|
|
# Deploy only on main (merge) + manual — never auto-deploy from a branch.
|
|
- event: push
|
|
branch: main
|
|
path:
|
|
- "ansible/roles/mqtt-bridge/**"
|
|
- "ansible/plays/edge-mqtt-bridge.yml"
|
|
- "ansible/inventory/group_vars/edge_host/**"
|
|
- ".woodpecker/deploy-edge-mqtt-bridge.yml"
|
|
- event: deployment
|
|
evaluate: 'CI_PIPELINE_DEPLOY_TARGET == "deploy-edge-mqtt-bridge"'
|
|
|
|
timeout: 30
|
|
|
|
steps:
|
|
- name: deploy-edge-mqtt-bridge
|
|
image: gitea.renner.uno/gitea_admin/ci-ansible:2026-04-29
|
|
environment:
|
|
ANSIBLE_FORCE_COLOR: "true"
|
|
ANSIBLE_HOST_KEY_CHECKING: "false"
|
|
ANSIBLE_ROLES_PATH: "../roles:./roles"
|
|
SSH_PRIVATE_KEY:
|
|
from_secret: ssh_private_key
|
|
VAULT_PASS:
|
|
from_secret: vault_pass
|
|
commands:
|
|
- mkdir -p ~/.ssh
|
|
- echo "$SSH_PRIVATE_KEY" | base64 -d > ~/.ssh/id_ed25519
|
|
- chmod 600 ~/.ssh/id_ed25519
|
|
- printf "Host *\n\tStrictHostKeyChecking no\n\tUserKnownHostsFile /dev/null\n" > ~/.ssh/config
|
|
- cd ansible
|
|
- echo "$VAULT_PASS" > .vault_pass && chmod 600 .vault_pass
|
|
- export ANSIBLE_VAULT_PASSWORD_FILE=.vault_pass
|
|
# Local MQTT bridge on the edge hosts only (REN-1307); restarts only the
|
|
# local mosquitto on edge-1, never the cluster broker.
|
|
- ansible-playbook -i inventory/ plays/edge-mqtt-bridge.yml -v
|