CI #77
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'mdd-data/**.yml' | |
- 'mdd-data/**.yaml' | |
- 'requirements.txt' | |
- 'requirements.yml' | |
env: | |
CML_PASSWORD: ${{ secrets.CML_PASSWORD }} | |
CML_LAB: ${{ secrets.CML_LAB }} | |
CML_USERNAME: ${{ secrets.CML_USERNAME }} | |
CML_HOST: ${{ secrets.CML_HOST }} | |
CML_VERIFY_CERT: ${{ secrets.CML_VERIFY_CERT }} | |
jobs: | |
test: | |
runs-on: self-hosted | |
environment: mdd-dev | |
concurrency: mdd-dev | |
container: | |
image: ghcr.io/model-driven-devops/mdd:latest | |
steps: | |
- name: Checkout Inventory | |
uses: actions/checkout@v2 | |
- name: Install Python Requirements | |
run: pip install -r requirements.txt | |
- name: Install Ansible Collections | |
run: ansible-galaxy collection install -r requirements.yml | |
- name: Run YAMLLINT | |
run: yamllint mdd-data | |
- name: Save Rollback | |
run: ansible-playbook ciscops.mdd.nso_save_rollback | |
- name: Validate Data | |
run: ansible-playbook ciscops.mdd.validate | |
- name: Update Devices | |
run: ansible-playbook ciscops.mdd.nso_update_devices | |
- name: Deploy Changes | |
run: ansible-playbook ciscops.mdd.update -e dry_run=no | |
- name: Run Checks | |
run: ansible-playbook ciscops.mdd.check | |
- name: Load Rollback | |
run: ansible-playbook ciscops.mdd.nso_load_rollback |