Setup multibranch projects

After logging into the Jenkins web console, we’re ready to add our eksworkshop-app repository. Start by selecting New Item in the menu on the left side.

Jenkins Login

Set the name of the item to codecommit and select the AWS Code commit item type.

CodeCommit Item

In your Cloud9 workspace, execute the following commands to get your Git username and password.

echo $GIT_USERNAME
echo $GIT_PASSWORD

Back to Jenkins. In the Projects section, to the right of Code Commit Credentials, select Add then CodeCommit.

Jenkins new credentials

Set the Username and Password to the corresponding values from the previous command and click Add.

Jenkins CodeCommit Credentials

Confirm your current AWS Region.

echo https://codecommit.$AWS_REGION.amazonaws.com

Copy that value to theURL field under project and select your use from the Code Commit Credentials DropDown menu.

Jenkins Project Config

Select Save at the bottom left of the screen. Jenkins will begin executing the pipelines in repositories and branches that contain a Jenkinsfile.

Master Branch Pipeline