author | Heinz Junkes <junkes@fhi-berlin.mpg.de> |
Fri, 19 Jan 2018 16:05:31 +0100 | |
changeset 10 | f7c1eb1e5733 |
parent 5 | 3476542c437b |
permissions | -rw-r--r-- |
5
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
1 |
Create a job for epics-base-7.0 |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
2 |
''''''''''''''''''''''''''''''' |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
3 |
|
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
4 |
At first you have to install the TAP-plugin. Go to *Manage Jenkins*->*Manage Plugins* and install the *TAP Plugin* |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
5 |
|
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
6 |
To create a job, click *New Item* and select *Freestyle project*, Enter a name and click *OK*. |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
7 |
If you want the change the installation directory(default is ) of epics-base click on the *Advanced..*-Button |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
8 |
in the *General*-tab check *Use custom workspace* and enter a Directory path e.g. ``/opt/EPICS/${JOB_NAME}``. |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
9 |
If you choose to do this make shure the *Jenkins* user has the appropriate permission in that directory. |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
10 |
To do that enter the following into the terminal:: |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
11 |
|
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
12 |
sudo useradd -a -G root jenkins |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
13 |
sudo chmod --recursive a+rwx /opt/EPICS/epics-base |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
14 |
|
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
15 |
You also have to set you epics environment variables accordingly. |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
16 |
|
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
17 |
| Now setup the git configuration inside the *Source Code Management*-tab |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
18 |
| Select *Git* and enter the *Repository URL* ``https://git.launchpad.net/epics-base``. |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
19 |
| Add the Branch Specifier ``core/master`` |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
20 |
| Add with *Additional Behaviours* **Advanced sub-modules behaviours** and select *Recursively update submodules* |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
21 |
In the *Build Triggers*-tab select *Build periodically* and enter the desired build schedule, e.g:: |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
22 |
|
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
23 |
H 1 * * * |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
24 |
|
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
25 |
to update every Day roughly around 1am. |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
26 |
|
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
27 |
Now add a *build step* in the *Build*-tab, select *Execute shell* and enter:: |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
28 |
|
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
29 |
make clean uninstall |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
30 |
make |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
31 |
make --no-print-directory -j4 tapfiles |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
32 |
make -s test-results |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
33 |
|
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
34 |
to build epics-base and make tests. |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
35 |
|
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
36 |
Now add a *post-build action* **Publish TAP Results** and enter:: |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
37 |
|
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
38 |
**/O.*/*.tap |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
39 |
|
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
40 |
You can uncheck *Verbose* if wanted. |
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
41 |
|
3476542c437b
updated jenkins doc
Jonathan Grimm <jonathan@fhi-berlin.mpg.de>
parents:
diff
changeset
|
42 |
| You can add another *post-build action* to send a *Editable Email Notification* |