Task03
Trigger CI Pipeline

Trigger CI Pipeline

Step 1 - Commit code to local stage branch

    
git commit -a -m "initial setup"
    

    
[stage 56a0f1f] initial setup
 3 files changed, 24 insertions(+), 1 deletion(-)
    

Step 2 - Push local branch stage to remote

    
    git push --set-upstream origin stage
    

    
Enumerating objects: 29, done.
Counting objects: 100% (19/19), done.
Delta compression using up to 8 threads
Compressing objects: 100% (15/15), done.
Writing objects: 100% (15/15), 3.39 KiB | 3.39 MiB/s, done.
Total 15 (delta 5), reused 0 (delta 0), pack-reused 0
remote:
remote: To create a merge request for stage, visit:
remote:   http://10.0.208.215/CL-POD02/DEVWKS-3320/-/merge_requests/new?merge_request%5Bsource_branch%5D=stage
remote:
To 10.0.208.215:CL-POD02/DEVWKS-3320.git
 * [new branch]      stage -> stage
 branch 'stage' set up to track 'origin/stage'.
    

Step 3 - Check the code on GitLab

Open GitLab in a new browser tab:

  • Gitlab URL: http://10.0.208.215/CL-POD02/DEVWKS-3320

At the GitLab login screen, login using your username and password:

  • Username: user02
  • Password: cisco.123

Select the stage branch:

  1. Click main
  2. Click stage branch

Step 4 - Verify that the validate pipline was triggered by our code commit

As soon as our first commit was initiated, terraform validation was triggered. Open GitLab's Pipelines page:

  1. Click CI/CD on side menu
  2. Then click Piplines


Only the validate step was triggered by our commit. The circle check icon indicates that the pipeline succeeded.

Step 5 - Create a Pull Request

To trigger the configuration on our staging environment, let's create a pull request (PR), aka Merge Request:

  1. Click Merge Requests on side menu
  2. Then click New Merge Requests
  3. Select stage as Source branch
  4. Select main as Target branch
  5. Then click Compare branches and continue
  6. Accept the default value for all the fields, then click Create merge request
  7. Click circle in below screen, navigate to pipeline page
  8. Wait until the pipeline finishes. If the pipeline fails, you can click the step to check the error message

Step 6 - Verfiy on NDFC

In your browser, open another instance of the browser or another tab. Copy the url of Nexus Dashboard:

  • ND URL: https://10.15.0.14/appcenter/cisco/ndfc/ui/lan-fabric/fabrics
  • Username: admin
  • Password: cisco.123

Open fabric-stage on the fabric page, and verify the VRF and network are provisioned.


  • Introduction
  • NDFC and Terraform
  • Envrionment and Topology
  • Task01 Interface Module
  • Task02 Overlay Module
  • Task03 CI/CD Pipeline
  • Bonus: Policy Module
  • Thanks