- You have created a Jenkins server in AWS according to these instructions
- You have a “jenkins-regression-test” repository with a build script ready for ANT to run (borrow ours [here] if you like!)
- Use a browser on a bastion to connect to your Jenkins server as installed earlier and login
- Click New item (near top left)
- Supply a name
- Select Freestyle project
- Click OK
- Pick Git under source code management
- Cut and paste your repository URL (use https://bitbucket.org/<TeamName>/jenkins-regression-test.git or similar for testing)
- Examine the files in this repository and note what additional resources you may need to create, eg an RDS instance, for the build test to run correctly
- Create those additional resources with the correct security groups and note the relevant connection details (eg a public address to an RDS, user/password)
- Ignore the error, and click add credentials
- Select user name and password (default) and enter your bitbucket username and password (better if this is a generic read-only account)
- From the Credentials drop-down, select the credentials you just created
- Scroll down to Build Triggers, click “Poll SCM” and enter H/5 * * * * (which is modified cron syntax. H/5 means roughly every 5 minutes optimised to reduce load spikes)
- Click Add build step under Build and Select Invoke ANT
- Pick an ANT version (not the default, that doesn’t seem to work)
- Click post-build actions dropdown under Post-build Actions and select email notification
- Click both check boxes and enter the project leader’s email address
- Click Save
- Click Build Now on the left-hand menu to verify.
Where to next?
Now you have a working continuous integration environment and can link it to a repository, it’s time to build something cool!