os-upgrade-automation/.woodpecker.yml

45 lines
1.4 KiB
YAML

branches:
include:
- main
steps:
lint:
image: python:3.11-slim
commands:
- pip install --no-cache-dir ansible ansible-lint
- ansible-lint -v
dryrun:
image: python:3.11-slim
commands:
- pip install --no-cache-dir ansible
- echo "$ANSIBLE_VAULT_PASSWORD" > .vault_pass
- ansible-galaxy collection install -r playbook/requirements.yml --force
- ansible-playbook playbook/playbook.yml --check --list-tasks \
--vault-password-file .vault_pass -i 'localhost,' -c local -e 'gather_facts=false'
secrets: [ANSIBLE_VAULT_PASSWORD]
run_preflight:
when:
event: [manual]
image: python:3.11-slim
commands:
- pip install --no-cache-dir ansible
- echo "$ANSIBLE_VAULT_PASSWORD" > .vault_pass
- ansible-galaxy collection install -r playbook/requirements.yml --force
- ansible-playbook playbook/playbook.yml --tags preflight -l pdp-portal \
--vault-password-file .vault_pass
secrets: [ANSIBLE_VAULT_PASSWORD]
run_patch:
when:
event: [manual]
image: python:3.11-slim
commands:
- pip install --no-cache-dir ansible
- echo "$ANSIBLE_VAULT_PASSWORD" > .vault_pass
- ansible-galaxy collection install -r playbook/requirements.yml --force
- ansible-playbook playbook/playbook.yml -l pdp-portal -e "target_clm_version=prod-2024-06" \
--vault-password-file .vault_pass
secrets: [ANSIBLE_VAULT_PASSWORD]