-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use Dockerhub API to poll for digest change (#19)
- Use Dockerhub API instead of checking manifest from Docker registry so each poll does not count as an image pull. This is needed as we got warning from docker support of exceeding docker rate limits. - Mock Dockerhub server in tests.
- Loading branch information
Showing
17 changed files
with
452 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
FROM golang:1.11-alpine | ||
FROM golang:1.12-alpine | ||
|
||
# Only install hard dependencies | ||
RUN apk add --no-cache gcc git musl-dev && \ | ||
go get -v -u golang.org/x/lint/golint && \ | ||
RUN apk add --no-cache gcc git musl-dev make && \ | ||
go get -v -u gotest.tools/gotestsum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Setup name variables for the package/tool | ||
NAME := registrywatcher | ||
PKG := github.com/dsaidgovsg/$(NAME) | ||
|
||
GOROOT := $(shell go env | grep GOROOT | cut -b 8-) | ||
|
||
.PHONY: snakeoil | ||
snakeoil: ## Update snakeoil certs for testing. | ||
go run $(GOROOT)/src/crypto/tls/generate_cert.go --host localhost,127.0.0.1 --ca | ||
mkdir -p testutils/snakeoil | ||
mv cert.pem $(CURDIR)/testutils/snakeoil/cert.pem | ||
mv key.pem $(CURDIR)/testutils/snakeoil/key.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.