Skip to content

Conversation

@devegupt
Copy link
Collaborator

Updating the pipeline to install the ansible collection in the setup stage. As of now it doesn't install ansible collection and requirements so the pipeline is failing.

@devegupt devegupt requested review from juburnet and mtarking and removed request for mtarking July 31, 2025 04:55
@@ -1,6 +1,7 @@
---
image: mtarking/nac-vxlan:24.0.1
image: danischm/nac:0.1.5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is old PR and need to test and work on the pipeline again, I was performing a few tests and was facing issue with the ansible version download as per requirement.txt. It was working for the nac:0.1.5 image. Please let me know of I can close this and work on a new PR.

paths:
- .pip_cache/

setup:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a one time action where you're using this for each stage or does each stage need a before_script:?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to check this again, I remember adding this as subsequent stages were showing error with missing packages.

when: manual
script:
- set -o pipefail && ansible-playbook -i inventory.yml vxlan.yml |& tee deploy_output.txt
- pip install --cache-dir .pip_cache -r requirements.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe before_script:?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, need to work on this pieline PR again.

- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- set -o pipefail && iac-test -d ./host_vars/nac-ndfc1 -d ./group_vars/ndfc/defaults.yaml -t ./tests/templates -f ./tests/filters -o ./tests/results/ndfc |& tee test_output.txt
- pip uninstall -y nac-test || true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why uninstall?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the Docker image had nac-test included and it was getting called when we run iac-test, which was causing issues with the robot tests as those are not supported yet for nac-test, so I had to remove this.

script:
- set -o pipefail && iac-test -d ./host_vars/nac-ndfc1 -d ./group_vars/ndfc/defaults.yaml -t ./tests/templates -f ./tests/filters -o ./tests/results/ndfc |& tee test_output.txt
- pip uninstall -y nac-test || true
- pip install --cache-dir .pip_cache -r requirements.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before_script:?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned above, need to work on this again.

@devegupt devegupt marked this pull request as draft November 5, 2025 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants