stage
and commit our GitLab job control file.
Make sure you are in the root directory of the project folder
cd ~/workspace/ndfclab/ansible
stage
git checkout -b stage
stage
Branch Changesgit status .
command to see the list of files that have been
modified in the previous
lab tasks.
git status .
On branch stage Untracked files: (use "git add..." to include in what will be committed) .gitlab-ci.yml leaf_devices.prod.yml leaf_devices.stage.yml verify_fabric.yml nothing added to commit but untracked files present (use "git add" to track)
Make sure your modified list of files matches the list of files above in the lab guide. If it does not then that means you missed a step or did not save one of the files you modified.
git add .
Now commit the code to your github repo stage
branch.
git commit -m "PipeLine Changes"
[stage e6e69b3] PipeLine Changes 4 files changed, 158 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 leaf_devices.prod.yml create mode 100644 leaf_devices.stage.yml create mode 100644 verify_fabric.yml
stage
to Remote
git push --set-upstream origin stage
Enumerating objects: 5, done. Counting objects: 100% (5/5), done. Delta compression using up to 8 threads Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 1.11 KiB | 1.11 MiB/s, done. Total 4 (delta 1), reused 0 (delta 0), pack-reused 0 remote: remote: To create a merge request for stage, visit: remote: http://10.0.208.215/CL-POD27/LTRDCN-3439/-/merge_requests/new?merge_request%5Bsource_branch%5D=stage remote: To 10.0.208.215:CL-POD27/LTRDCN-3439.git * [new branch] stage -> stage branch 'stage' set up to track 'origin/stage'.
Return to GitLab in your browser. In the branch drop-down, select your stage branch:
As soon as the code was committed to the stage branch, Ansible Lint validation was triggered, open pipelines:
Now we need to create merge request to verify/test the configuration against the NDFC staging environment fabric.
This deploy_on_stage
and verify_on_stage
are doing the following:
deploy_on_stage
runs the build_fabric.yml script against the staging fabric. This is important so that any time you make an update and commit the code in the staging
branch changes will be applied against the staging fabric first.
verify_on_stage
runs the verify_fabric.yml and verify_dataplane.yml scripts to verify that changes pushed by the deploy on stage step
did not break anything