Menu

Day 78: A Parameter and a Broken Route
📰

Day 78: A Parameter and a Broken Route

DEV Community: jenkins·Nnamdi Felix Ibe·8 days ago
#CUzl9SCv
#devtojenkins#devto#dev#route#branch
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.