- Create a workspace folder and work in it - e.g.
mkdir ~/tciWorkshop && cd ~/tciWorkshop
- clone the tci-server and tci-cust repositories:
git clone https://github.com/TikalCI/tci-server.git
git clone https://github.com/TikalCI/tci-cust.git
- cd to the tci-server folder:
cd tci-server
- Setup the server by running the following command, and filling the values using the default ones. For the customization folder, put the absolute path to the tci-server-test folder - e.g. /Users/tci/tciWorkshop/tci-cust/tikal/tci-server-test
./tci.sh init
- Load the server by running:
./tci.sh start
Write a declarative Jenkins pipeline which fulfill the following requirements:
- Sets 2 parameters:
- A Boolean parameter ‘RANDOM’ (defaulted to false) whether the status is set randomly or not.
- A choice parameter ‘STATUS’ (possible values: ‘SUCCESS’,’UNSTABLE’,’FAILURE’ & ‘ABORTED’).
- Sets the current build status according to the parameters:
- if not random, set it to the value of ‘STATUS’ parameter.
- if random, set it to a random status (out of the 4 possible statuses).
- On the post-build phase:
- If the status is not ‘SUCCESS’, prints the status to the build log.
- If the status is ‘SUCCESS’, prints the status to the build log only if the previous-build-status wasn’t ‘SUCCESS’, indicating the previous-build-status - e.g. [STATUS] SUCCESS (was: FAILURE).
- The job runs on any slave.
- The job saves only the last 10 builds.
- The build prints the timestamp of each line to the build log.
- The job has an overall timeout of only 10 seconds to run.
- Use tci-library as much as possible.