script step allows you to execute a single or more shell commands. It has one required property:
code and (as always) you can use the
name property to give the step a clear name.
Here are some examples that run one or more commands:
build: steps: - script: name: indentify distribution code: cat /etc/lsb-release - script: name: starting xvfb code: | # Start xvfb which gives the context an virtual display # which is required for tests that require an GUI export DISPLAY=:99.0 start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset # Give xvfb time to start. 3 seconds is the default for all xvfb-run commands. sleep 3