06.05
- 6.5 Configure a scripted deployment job
- Learning Objectives
- Create a scripted deployment job in Jenkins
6.5 Configure a scripted deployment job
Learning Objectives
By the end of this lesson you will be able to:
- Create a Jenkins job that runs a scripted deployment.
Create a scripted deployment job in Jenkins
- From the Jenkins dashboard, select the New Job link.
- Select the checkbox next to This build is parameterized. Enter a String Parameter type and give it the name STACK_NAME. Enter your student id for the Default Value text field.
- Enter MyDeployment in the Job name field. Click on the Build a free-style software project radio button and click the OK button.
Under the Source Code Management section, select the Git radio button. In the Repository URL field, enter your forked repository URL (where student29 is your student id):
git@github.com:student29/continuous_integration_example.git
In the Branches to build | Branch Specifier field, enter **.
Within the Build section, enter the following command in the Execute shell text field.
echo ${STACK_NAME} cd software/deployment/ cap deploy:setup ls pwd
Click the Save button.
- Go back to the Jenkins dashboard and click the Build button next to the MyDeployment job.