Skip to content

Commit

Permalink
Mount /tmp directory into parse-failures template
Browse files Browse the repository at this point in the history
Description:
- post-sync failures aren't being reported to `#govuk-deploy-arts` and give the following error message:
```level=error msg="cannot save parameter /tmp/message.txt" argo=true error="open /tmp/message.txt: no such file or directory"```
- This is due to alphagov/govuk-infrastructure@e7e840d setting Argo Workflow pods as `readOnlyRootFileSystem`
- Solution is to mount `/tmp` in so the pod can write to it
- As part of #1883
  • Loading branch information
nimalank7 committed Dec 2, 2024
1 parent dfe08e4 commit 0b52ff6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,17 @@ spec:
image: 172025368201.dkr.ecr.eu-west-1.amazonaws.com/github/alphagov/govuk/toolbox:latest
command:
- /bin/bash
volumeMounts:
- name: tmp
mountPath: /tmp
resources: {}
source: >
#!/usr/bin/env bash
echo {{"{{workflow.failures}}"}} | jq -r 'group_by(.templateName) | map({templateName: .[0].templateName, errorMessages: [.[].message | select(length > 0)] | unique}) | map("- \(.templateName): " + (["\(.errorMessages[])"] | join(",")) ) | .[]' > /tmp/message.txt
volumes:
- name: tmp
emptyDir: {}
- name: exit-handler
steps:
- - name: parse-failures
Expand Down

0 comments on commit 0b52ff6

Please sign in to comment.