Skip to content

Commit

Permalink
Always check the refresh timeout on images. Also refresh built images
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Duchesne committed Nov 28, 2018
1 parent 2c8a94a commit e7bfbff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ func checkImage(image string) bool {
var reECR = regexp.MustCompile(`(?P<account>[0-9]+)\.dkr\.ecr\.(?P<region>[a-z0-9\-]+)\.amazonaws\.com`)

func refreshImage(image string) {
refresh = true // Setting this to true will ensure that dependant built images will also be refreshed
ErrPrintf("Checking if there is a newer version of docker image %v\n", image)
err := getDockerUpdateCmd(image).Run()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func main() {
}

imageName := config.GetImageName()
if config.ImageVersion == nil && lastRefresh(imageName) > config.Refresh || !checkImage(imageName) || refresh {
if lastRefresh(imageName) > config.Refresh || !checkImage(imageName) || refresh {
refreshImage(imageName)
}

Expand Down

0 comments on commit e7bfbff

Please sign in to comment.