snowflakedb / SnowAlert

Security Analytics Using The Snowflake Data Warehouse
Apache License 2.0
183 stars 57 forks source link

[GSE-4024] Tag image with commit SHA after build, and push to repository #671

Closed sfc-gh-gtan closed 5 months ago

sfc-gh-gtan commented 5 months ago
  1. Added a post_push hook to add an extra tag using the commit SHA to the image after Dockerhub build finishes. This tag can help us with reverts in the future. Got this from: https://github.com/docker/hub-feedback/issues/341#issuecomment-248722131 and the docker hub documentation: https://docs.docker.com/docker-hub/builds/advanced/#push-to-multiple-repositories

  2. precommit was not working unless I set language_version to python3 instead of 3.7 locally. error below:

precommit error
sfc-gh-gtan commented 5 months ago

@sfc-gh-bkou @sfc-gh-afedorov: I'm not really sure how to test the post-build hook.

I was able to run the unit test suite, and some passed, but others failed because I don't have the env setup for connecting to snowflake backend. The changes are to the precommit.yml and the docker hub build hooks so it should be safe.