Jenkins Develop Stage1 Linux Build - johnttaylor/epc GitHub Wiki
develop
branch for on a Linux host
Configure to build the Start by copying the CI-Stage1-linux. From the Dashboard->GM6000
page, select New Item
from the left hand menu and enter the CI-Stage1-linux
in the Copy from
option, then click the OK
button.
- Do NOT use spaces in the project name.
Note: Only the minimal configuration is show, i.e. additional configuration as needed can be added.
General
-
Select
Discard old builds
and enter criteria. Note: The build artifacts will be deleted when old builds are discarded. -
Select
GitHub
Project and enter the URL for the GitHub hosted project (without the tree/master or tree/branch part). -
Select
Restrict where this project can bed run
and enter the Linux Agent's name
Source Code Management
-
Select
Git
, enter the SSH clone URL for the repository, -
Enter the previous created SSH Key credentials (or click
Add
to create the credential) -
Click the
Advance
button and enter the following for the Refspec field:refs/heads/develop:refs/remotes/origin/develop
-
Enter the following for the Branch Specifier field:
${GITHUB_BRANCH_HEAD_SHA}
-
Click the
Add
button to theCustom user name/e-mail address
- Enter a GitHub user and email address. This user/email address will be used by Jenkins when/if it pushes changes to GitHub
Build Triggers
Note: The trigger uses a Cron
job to pull for changes in the GitHub repository. This is required when the Jenkins server is behind a firewall and does not have a public IP address on the internet (i.e. can't be notified directly by GitHub when a change occurs).
-
Select
GitHub Branches
-
Select
Hooks plus Cron with Persisted Data
-
Set the Crontab line to desired polled rate, e.g. once a minute:
* * * * *
-
Add the following _Trigger Events`
Branch Restrictions
- Select
Match branches against pattern criteria
- Enter
develop
for the Branch Names or Patterns field
- Select
Hash Changed
-
Accept the default
Experimental
options
Build Environment
-
Select
Add timestamps to the Console Output
-
Select
Terminate a build if it's stuck
and set the timeout to60
minutes
Build Steps
Note: There is single batch/script file in the repository that is responsible for building and executing all unit tests. In addition, the script builds the release and debug version of the target and simulator executables.
-
Click the
Add build step
button and selectExecute shell
-
Enter the following command. Note: The Jenkins
BUILD_NUMBER
is passed to the script. TheBUILD_NUMBER
is the canonical build number for all software images in the project. For more details see Jenkins Build Numbertop/build_linux.sh $BUILD_NUMBER
Post Build Actions
E-mail Notification
-
Click
Add post-build action
and selectE-mail Notification
. -
Enter the email address of the technical lead and select
Send e-mail for every unstable build
andSend separate e-mails to individual who broke the build
options
Trigger parameterized build on other projects
-
Click
Add post-build action
and selectTrigger parameterized build on other projects
. -
Enter the down stream project to build:
Develop-Stage2-windows
-
Add the following _Trigger Parameters`
Pass through Git Commit that was built
Predefined parameters
and then enter the following lines:MY_BUILD_NUMBER=0 sha1=${sha1}
Set starting Build Number
- Set the starting build to
1000000
by clicking the-> Set Next Build Number
from the left hand menu. Click here for more details about the build number