This repository has been archived by the owner on Feb 15, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add concourse pipeline to automate exports
This adds a pipeline file that concourse uses to run exports. It has 3 jobs. The first of these keeps this pipeline up to date in concourse, the second is a job that runs on a schedule at 10am to perform the live export and the last job is a test export that runs against the draft survey that can be used for testing. The export job is started at approximately 10am (it is based on when concourse first checks the timer which is on a 2 minute interval). It starts by sending a slack notification to say the job is starting, it then runs the export task. If the export task fails or has an error another slack notification is sent to inform the team (it notifies a group). If the export is successful it outputs a file `output/slack-message.txt` which is consumed by the successful slack notification to include contextual information. For simplicity I've hard coded the test job with google folder ids and my own email since I didn't feel these needed to be secret (we only use these folders for test data). This references a number of secrets that are already configured in Concourse under the govuk-ask-export namespace. This does a few WTFs in that I'll try explain (some might be because this is my first concourse file): - Using the google-drive branch: this is temporary and will be switched to master once merged. This is done to keep concourse up-to-date while this is under review. - The 12pm time: Concourse will only allow running the job when the time is between the times specified. I've set this to 12pm to allow a 2 hour window where we can try retry the job manually if, for instance, the job failed due to an intermittent error. - Only specifying a path for Slack notification: because of a truly bizarre [AWS SSM behaviour](aws/aws-cli#2507) gds-cli can't seem to add full URL secrets to Concourse and won't be able to until they update their AWS library. A path is a workaround. - The strange `<!subteam^S0145ESTQE8>` in the slack notification is the syntax to reference a group. This references the govuk-ask-support group on GDS Slack. I couldn't work out a nice way to stop duplicating it (I didn't really want to add another secret / env var)
- Loading branch information