Skip to content

Commit

Permalink
Clarify docs on running rake task with CSV
Browse files Browse the repository at this point in the history
Add details on how to push up a csv file and run rake tasks from the
command line.
  • Loading branch information
beccapearce committed Feb 10, 2022
1 parent ec5a29b commit 2853d87
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/manual/government-changes.html.md.erb
Expand Up @@ -145,10 +145,17 @@ order):
| `New lead organisations` | The slugs of the new leading organisations (separated by a comma). These will replace any existing organisations. |
| `New supporting organisations` | The slugs of the new supporting organisations (separated by a comma). These will replace any existing organisations. |

To run on anything other than a local environment, the CSV needs to be added manually to the /tmp directory using scp-push.
```
$ gds govuk connect scp-push --environment [integration|staging|integration] name-of-machine[:1|:2|:3] path/to/file.csv /tmp/
```
The rake task can then be run from the command line following [these instructions][running-rake-tasks-on-the-command-line].

There is a similar [Rake task to change the organisations for Manuals][manuals-bulk-update-organisation].
A data migration is required to change the organisations for (Mainstream) Publisher documents. This is an example PR: [Migrate Publisher docs][publisher-bulk-update-organisation-example]

[whitehall-bulk-update-organisation]: https://github.com/alphagov/whitehall/blob/main/lib/tasks/data_hygiene.rake
[running-rake-tasks-on-the-command-line]: https://docs.publishing.service.gov.uk/manual/running-rake-tasks.html#run-rake-tasks-from-the-command-line
[manuals-bulk-update-organisation]: https://github.com/alphagov/manuals-publisher/blob/main/lib/tasks/update_manual_organisation.rake
[publisher-bulk-update-organisation-example]: https://github.com/alphagov/publishing-api/pull/1981

Expand Down

0 comments on commit 2853d87

Please sign in to comment.