6.5 Configure a scripted deployment job

Learning Objectives

By the end of this lesson you will be able to:

Create a scripted deployment job in Jenkins

  1. From the Jenkins dashboard, select the New Job link.
  2. 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.
  3. Enter MyDeployment in the Job name field. Click on the Build a free-style software project radio button and click the OK button.
  4. 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):
  5. In the Branches to build | Branch Specifier field, enter **.
  6. Within the Build section, enter the following command in the Execute shell text field.
    echo ${STACK_NAME}
    cd software/deployment/
    cap deploy:setup	            	
  7. Click the Save button.
  8. Go back to the Jenkins dashboard and click the Build button next to the MyDeployment job.