Table of contents

This page was imported from the opsmanual on github.gds. It hasn’t been reviewed for accuracy yet. View history in old opsmanual

Upload HMRC PAYE files


HMRC have a desktop application to submit PAYE. This is available on Windows, Linux, and OS X.

As part of the initial tranche of ministerial department migration their upload site was switched off. However, we don’t currently allow exe files or other executable binary types to be uploaded to GOV.UK. Therefore we determined the quickest course of action to meet the user need of keeping their desktop software up to date was to manually upload and host the files ourselves.

This document describes the process by which this is actioned.

The way the updates work:

  • Binaries are provided for Windows, OS X and Linux
  • Deltas of the binaries are also provided for partial updates
  • The software hits a manifest file (realtimepayetools-update-v14.xml) to determine which files to download. This manifest contains the version number and partial paths to each of the available binaries. This manifest URL is hard-coded in the desktop software and must remain stable
  • The software downloads the relevant binaries from our asset host and updates itself
  • There is also a mainstream content item which should be updated to link to the full downloads of the new versions

Where are the files?

The files are currently stored in our asset host. This can be seen as follows:

ssh asset-master-1.backend.production ls /mnt/uploads/whitehall/clean/uploaded/hmrc

Also see the Puppet definition for how these files are served.

The files are:

  • payetools-{linux,osx,win}.zip - the full binary
  • payetools-rti-$version-{linux,osx,win}.zip - the binary patch updates
  • realtimepayetools-update-v14.xml - a manifest file describing the patch update locations and versions
  • test-realtimepayetools-update-v14.xml - the next patch release test file, used by the software provider to test the end to end process

The process for uploading new versions of the app

  1. HMRC submit a ticket via Zendesk (example)
  2. Download all zip files and XML file in the ticket
  3. Upload the ZIP files only:

    scp *.zip asset-master-1.backend.production:/mnt/uploads/whitehall/clean/uploaded/hmrc/
    ssh asset-master-1.backend.production 'chown assets /mnt/uploads/whitehall/clean/uploaded/hmrc/*.zip'
  4. Replace the XML manifest prefixed with test:

    scp realtimepayetools-update-v14.xml asset-master-1.backend.production:/mnt/uploads/whitehall/clean/uploaded/hmrc/test-realtimepayetools-update-v14.xml
  5. Reply to the Zendesk ticket, providing the test-*.xml URL of:
  6. When Aspire or one of the other suppliers replies that the file works fine, the new edition of the mainstream content item can be prepped by the content team with the new links and version number, ready to publish at the launch time.

  7. When the launch time comes (which should be specified in the Zendesk ticket), copy the test file over the production file using the following commands (the mv command can’t be used because it doesn’t update the modified time of the file):

    ssh asset-master-1.backend.production
    cat /mnt/uploads/whitehall/clean/uploaded/hmrc/test-realtimepayetools-update-v14.xml | sudo -u assets tee /mnt/uploads/whitehall/clean/uploaded/hmrc/realtimepayetools-update-v14.xml
  8. Purge the cache, which will otherwise take up the 12 hours to expire:

    fab $environment cdn.purge_all:/government/uploads/uploaded/hmrc/test-realtimepayetools-update-v14.xml
  9. Update and resolve the Zendesk ticket

This page is owned by #2ndline and needs to be reviewed