Day 78 of DevOps, Day 28 of Azure. Both tasks today worked, and in both cases, knowing why they worked mattered more than the fact that they did.
A pipeline took a branch name from whoever triggered the build and interpolated it into a shell command, which is the shape of a security problem. It is safe, because of a quoting rule nobody mentions. And an Azure server served HTTP 200 from outside Azure, over its public IP, and still failed the task.
One Jenkins task, one Azure task. Make a deployment pipeline take the branch as a parameter, then fix a public network nobody could reach. The tasks come from the KodeKloud Engineer platform.
Task 1: A branch as a parameter
The task: a Pipeline job named devops-webapp-job that deploys whichever branch the user names at build time.
Step 1: Notice which branch the server is already on
[ sarah@stapp01 html] $ git branch * feature master
Enter fullscreen mode
Exit fullscreen mode
The application was serving the feature branch before the job existed.…