Using jenkins as a task runner
Jenkins can be used a distributed task queue. It's not pretty, but it can work...
Creating a Build Job that qa will use
- QA-Board needs to be setup with the ENV variable
JENKINS_AUTH, in order to communicate with jenkins. - Create a Build Job configured with:
- Enable "Trigger builds remotely", note the token
- Parametrized: task should be a String parameter that gets a command to run
- Build > "Execute Windows Batch command"
# if you need to make sure shared drive are available...
net use \\server\share
@echo "%task%"
"%task%""
- qaboard.yaml needs to be configured with something like:
runners:
jenkins:
build_url: https://jenkins.example.com/job/my-team/job/WindowsExecutor
token: "1234"
You can also use the QA_RUNNERS_JENKINS_BUILD_URL and QA_RUNNERS_JENKINS_TOKEN environment variables.
caution
The runner is named windows, while its configuration is under runners.jenkins. Set runners.default (e.g. to local): otherwise qa batch would try to use a runner named jenkins, which doesn't exist.
How to use this runner?
Multiple options:
- On the CLI:
qa batch --runner=windows - As the default runner, with
runners.default: windowsin qaboard.yaml
caution
Choosing the runner per batch, with runner: windows in a batch, doesn't work at the moment: the CLI's runner (--runner or runners.default) always wins.