Learning Resources for DevOps, SRE, Cloud & Engineering Management
Takes user inputs parameters to select branch and environment (Run Via Jenkins Freestyle Job)
Follow the tutorial video to get the configuration done. Essentially, the following steps are to be followed:
- Define the github repo url/credentials in the Jenkins Freestyle Job.
- Check the "This project is parameterized" and enable Choice Parameter with valid choices ("Red" or "Blue" in this example.) the build phase select the
shell script
option and add the following:
#!/bin/bash
if [[ "${choice}" == "Red" ]]; then
mv html/index.red html/index.html
else
mv html/index.blue html/index.html
fi
- In the build phase select the
shell script
option and add thejenkins-cicd.sh
script as below.chmod +x jenkins-cicd.sh bash jenkins-cicd.sh
- Save the job and execute the build. Follow the execution via console logs.
Open browser at http://IP-Address-of-Docker-Server:8888/
to view the website.
BINPIPE aims to simplify learning for those who are looking to make a foothold in the industry. Write to me at nixgurus@gmail.com if you are looking for tailor-made training sessions. For self-study resources look around in this repository, the Binpipe Blog and Youtube Channel.
📒 Maintainer: Prasanjit Singh | www.binpipe.org