Run a rake task
There is a Jenkins job that can be used to run any rake task:
- Integration: https://deploy.integration.publishing.service.gov.uk/job/run-rake-task/
- Staging: https://deploy.blue.staging.govuk.digital/job/run-rake-task/
- Production: https://deploy.blue.production.govuk.digital/job/run-rake-task/
Jenkins jobs are also linkable. For example:
Run rake tasks from the command line
It is possible to bypass Jenkins and run the rake tasks directly on the relevant app machines.
First, SSH into the right machine class (e.g.
gds govuk connect ssh -e production publishing_api
Secondly, change directory so that the rake task is available:
Finally, run the rake task, e.g.:
govuk_setenv publishing-api bundle exec \ rake 'represent_downstream:published_between[2018-12-17T01:02:30, 2018-12-18T10:20:30]'