Skip to content

update

update #66

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI_Commits
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the develop branch
push:
branches: [ enable_actions ]
pull_request:
branches: [ enable_actions ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# build:
# name: Build DC VXLAN collection
# runs-on: ubuntu-latest
# strategy:
# matrix:
# # ansible: [2.9.26, 2.10.17, 2.11.12, 2.12.10, 2.13.8, 2.14.2]
# ansible: [2.14.15, 2.16.5]
# steps:
# - name: Check out code
# uses: actions/checkout@v2
# - name: Set up Python 3.10.14
# uses: actions/setup-python@v1
# with:
# python-version: 3.10.14
# - name: Install ansible-base (v${{ matrix.ansible }})
# run: pip install https://github.com/ansible/ansible/archive/v${{ matrix.ansible }}.tar.gz --disable-pip-version-check
# - name: Build a DCNM collection tarball
# run: ansible-galaxy collection build --output-path "${GITHUB_WORKSPACE}/.cache/collection-tarballs"
# - name: Store migrated collection artifacts
# uses: actions/upload-artifact@v1
# with:
# name: collection
# path: .cache/collection-tarballs
# sanity:
# name: Sanity (Ⓐ${{ matrix.ansible }})
# needs:
# - build
# runs-on: ubuntu-latest
# strategy:
# matrix:
# # ansible: [2.10.17, 2.11.12, 2.12.10, 2.13.13, 2.14.15, 2.16.5]
# ansible: [2.14.15, 2.16.5]
# python: ['3.10']
# steps:
# - name: Set up Python 3.10.14
# uses: actions/setup-python@v1
# with:
# python-version: 3.10.14
# - name: Upgrade pip
# run: |
# pip install --upgrade pip
# - name: Install iac-validate
# run: |
# pip install iac-validate
# - name: Install iac-test
# run: |
# pip install iac-test
# - name: Install ansible-base (v${{ matrix.ansible }})
# run: pip install https://github.com/ansible/ansible/archive/v${{ matrix.ansible }}.tar.gz --disable-pip-version-check
# - name: Download migrated collection artifacts
# uses: actions/download-artifact@v1
# with:
# name: collection
# path: .cache/collection-tarballs
# - name: Create ansible.cfg file
# run: |
# echo "[galaxy]" > ansible.cfg
# echo "server = https://old-galaxy.ansible.com/" >> ansible.cfg
# cat ansible.cfg
# - name: Install the collection tarball
# run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
# - name: Run sanity tests
# run: ansible-test sanity --docker --python ${{matrix.python}} -v --color --truncate 0
# working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/nac_dc_vxlan
integration:
name: Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: mkdir for Example Repo
run: mkdir -p /home/runner/work/ansible-dc-vxlan/ansible-dc-vxlan/ansible-dc-vxlan-example
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build a nac-dc-vxlan collection tarball
run: ansible-galaxy collection build
- name: Checkout Example Repo
uses: actions/checkout@v4
with:
repository: netascode/ansible-dc-vxlan-example
ref: example_data
token: ${{ secrets.MTARKING_GH_PAT }}
path: /home/runner/work/ansible-dc-vxlan/ansible-dc-vxlan/ansible-dc-vxlan-example
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ansible-dc-vxlan-example/requirements.txt
- name: Install the collection tarball
run: ansible-galaxy collection install cisco-nac_dc_vxlan-0.1.0.tar.gz
- name: Install supporting collections
run: ansible-galaxy collection install -r ansible-dc-vxlan-example/requirements.yml
- name: Check Ansible Collection List
run: ansible-galaxy collection list
- name: Check my IP
run: curl ifconfig.me
- name: Run playbook
env:
NDFC_HOST: ${{ secrets.NDFC_HOST }}
NDFC_USER: ${{ secrets.NDFC_USER }}
NDFC_PASS: ${{ secrets.NDFC_PASS }}
run: ansible-playbook -i ansible-dc-vxlan-example/inventory.yml ansible-dc-vxlan-example/vxlan.yml -vvv