Use the makefile to compile the c++ file and run the test with googleTest.
Follow the steps to complete settings. You need to setup the compile environment on your PC to run the project with test, and add webhook for your repository that can trigger CI server to do the building and running automated test.
This project is only used to create the environment, you should clean it when HW1.
- Thu Sep 14 2017 14:56:35
Modify makefile.
Notice that Mac's googleTest installation guide, the command should be amended.
Original:
sudo cp -r gtest-1.7.0/include /usr/local/Cellar/gtest/
Modified:
sudo cp -r gtest-1.7.0/include/ /usr/local/Cellar/- Wed Sep 13 2017 14:12:35
About <studentId>, you should replace whole brackets not just "studentId". That is ok on email subject , but you should be careful the webhook.
Good:
http://140.124.181.114:8080/buildByToken/build?job=1055980XX&token=1055980XX
Bad:
http://140.124.181.114:8080/buildByToken/build?job=<1055980XX>&token=<1055980XX>
And about your own repository, if you want to test your CI job is setup or not: init your repository and place this project's file, commit and push a simple change, and go to CI server to check the job result.
cd <your/project/path>
make
./expAfter run the exp file, you should get the result like that:
You already have an account on the CI server.
Username and password is your student id, so your need to reset password first.
Name your repository whatever you want, and place this project's file to your own repository(exclude .git folder).
On repository page -> Settings -> Webhooks -> Add webhook -> set Payload URL :
http://140.124.181.114:8080/buildByToken/build?job=<studentId>&token=<studentId>
And it should show the green tick.
Email to posd2017f@gmail.com. Just need subject, no content required.
Subject: <studentId>, <repositoryURL>
Wait TA for setting, your CI job will be triggered to run test after every push.
If you have some problems that you really don't know why and how to solve it, email us: posd2017f@gmail.com or come to 1321 in office hours (Fri. 2pm to 4pm).



