now re-pulls Image regularily
ci/woodpecker/push/woodpecker Pipeline failed Details

main
Johannes Bülow 2024-02-02 10:41:51 +01:00
parent 0e21438cc8
commit e5c78de08f
Signed by untrusted user who does not match committer: jmb
GPG Key ID: B56971CF7B8F83A6
1 changed files with 12 additions and 8 deletions

View File

@ -41,15 +41,19 @@ func ConnectSocket() {
}
func PullImage() error {
log.Println("Downloading Container image ", viper.GetString("image"))
image := viper.GetString("image")
conn := Socket
_, err := images.Pull(conn, image, nil)
if err != nil {
log.Println(err)
return err
for {
log.Println("Downloading Container image ", viper.GetString("image"))
image := viper.GetString("image")
conn := Socket
_, err := images.Pull(conn, image, nil)
if err != nil {
log.Println(err)
return err
}
time.Sleep(1 * time.Hour)
}
return nil
}
// Cleanup deletes Containers older than the specified maximum Age (Equal to session cookie maximum age)