14 Commits

Author SHA1 Message Date
Iain Sproat 20b5b7fdc3 chore(deps): bump go dependencies (#37)
* chore(deps): bump go dependencies

* chore(deps): bump version of git in Dockerfile builder

* downgrade to previous release candidate of git
2024-06-18 08:54:15 +01:00
Iain Sproat f79a6754f5 chore(circleci): update remote docker to prevent 'brownout' (#36)
* chore(circleci): update remote docker to prevent 'brownout'

* Update packages
2024-05-28 16:13:24 +01:00
Iain Sproat 035505cb0e chore(deps): bump dependencies (#29) 2024-01-03 19:03:24 +00:00
Iain Sproat 5de0c11f44 chore(deps): bump dependencies (#28)
* chore(deps): bumps numerous dependencies to latest versions
- addresses snyk vulnerabilities
* Bump dockerfile packages
2023-08-08 07:06:14 +01:00
Iain Sproat e7fcdec23d chore(deps): bump all dependencies (#27)
* chore(deps): bumps all go dependencies to latest as of 2023-03-16
* chore(deps): bump version of git to 2.38.4-r1
2023-03-16 18:42:25 +00:00
Iain Sproat 3cf3536256 chore(deps): bump all dependencies (#26)
* chore(deps): bump all dependencies
* chore(docker): bump dependencies
2023-02-07 08:49:24 +00:00
Iain Sproat ad387e2a4d Update SSH Key fingerprint to use Deploy key configured by CircleCI (#24)
* Update SSH Key fingerprint to use Deploy key configured by CircleCI
- removes unused orb reference
- removes unneeded version info

* Bump alpine dependencies
2023-01-05 16:25:18 +00:00
Iain Sproat b4a48fd928 Refactor and productionise (#6)
* Adds development instructions to README
* Replaces deprecated io/ioutil with io package
* Catch all thrown errors and handle them.
  - not catching errors could result in unknown behaviour
* Fix gofmt formatting issues
* Refactor to allow http client to be provided
  - default client does not have timeout etc., we may instead wish to provide a custom http client.
* Refactor to something closer to the standard go layout
  - separates alert forwarder into separate package to allow for testing/reuse
* Split out types, and split Discord client into its own package
* Renaming of symbols for readability
  - no need to abbreviate words in modern IDEs
* remove go-vet hook as it is broken when go files are not in root directory
* unit tests for ~90% coverage
* Update picture in README
* Return error status codes to caller in event of error from Discord
* Remove panic, replace with error status code response and log message. Improve the status codes that are returned to provide more context on what has occurred.
* Graceful shutdown of server, including signal handling
* Integration tests
  - mocks Discord server
  - tests Happy case and a couple of unhappy cases
  - most edge conditions are otherwise tested in unit tests
* CheckWebHook should return errors instead of logging
  - additional checks in tests for nil objects
  - attempt to solve integration test pollution by using different port numbers to prevent potential collision
  - Temporarily comment out test causing interaction pollution with other tests
* structured logging
* feat(exponential backoff): Added to Discord client
* Serve prometheus metrics
  - Monitoring for the discord client
* adds correlation ID to logging
* refactors the mock http client to allow it to work with instrumentation for monitoring
* Helm chart service monitor
* Improved flag and env var parsing
* Application version passed in via build args
* Order of precedence of configuration configuration file<environment variable<command line
* Mounts secret to file instead of in environment variable
* Adds build tag to integration tests to prevent them being run as a unit test
2022-11-14 09:46:27 +00:00
Iain Sproat 2c0628507c ci(pre-commit): Adds pre-commit script to verify Dockerfile & Go 2022-11-07 17:31:34 +00:00
Jan Collijs 99f5833aee Removed GOARCH parameter to be able to build arm images 2021-02-01 19:19:24 +01:00
Ben Cox 13d3a39e11 Allow easier LISTEN_ADDRESS overrides to dockerfile
Because listen.address was hard coded in the Docker file, it would override any ENVVAR set in any
other docker file, this made it hard to change the default listening port to anything else. By switching
to `ENV LISTEN_ADDRESS=0.0.0.0:9094` people should be able to override the address that
the docker file listens on much easier.

This closes #12 
This closes #11
2021-01-18 12:19:15 +00:00
Julien Vallée eac7521a45 Have the daemon listening on 0.0.0.0
As we default to 127.0.0.1 in the code
2020-10-16 14:30:59 +02:00
David Young 0b75833a50 Updated Dockerization 2018-09-18 12:47:17 +12:00
David Young a95f814b81 Added Dockerfile 2018-09-18 12:11:31 +12:00