add http head based digest comparison to avoid dockerhub rate limits
parent
c8bd484b9e
commit
cb62b16369
@ -0,0 +1,620 @@
|
|||||||
|
mode: set
|
||||||
|
github.com/containrrr/watchtower/internal/util/rand_name.go:8.24,10.19 2 0
|
||||||
|
github.com/containrrr/watchtower/internal/util/rand_name.go:14.2,14.18 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/util/rand_name.go:10.19,12.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:4.39,5.24 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:9.2,9.20 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:15.2,15.13 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:5.24,7.3 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:9.20,10.21 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:10.21,12.4 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:19.46,22.24 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:37.2,37.10 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:22.24,25.25 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:32.3,32.13 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:25.25,26.16 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:26.16,28.10 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:32.13,34.4 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:41.68,44.25 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:54.2,54.10 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:44.25,45.27 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:45.27,46.16 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:46.16,48.5 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:49.9,51.4 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:58.72,61.25 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:67.2,67.10 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:61.25,62.27 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/util/util.go:62.27,64.4 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:6.63,6.90 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:9.43,9.58 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:12.66,13.21 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:17.2,17.44 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:13.21,15.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:17.44,18.30 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:23.3,23.15 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:18.30,19.52 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:19.52,21.5 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:28.56,29.44 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:29.44,33.10 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:37.3,37.23 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:33.10,35.4 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:42.58,43.44 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:43.44,45.26 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:50.3,50.23 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:45.26,48.4 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:55.64,56.17 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:60.2,60.44 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:56.17,58.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:60.44,62.36 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:66.3,66.15 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:62.36,64.4 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:71.75,74.17 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:79.2,79.17 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:84.2,85.15 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:74.17,78.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/filters/filters.go:79.17,83.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:20.50,25.2 4 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:28.50,154.2 22 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:157.56,299.2 24 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:302.20,313.2 10 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:317.42,325.53 6 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:328.2,328.55 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:331.2,331.63 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:334.2,334.57 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:337.2,337.63 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:340.2,340.67 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:343.2,343.12 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:325.53,327.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:328.55,330.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:331.63,333.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:334.57,336.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:337.63,339.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:340.67,342.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:347.70,356.57 7 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:359.2,359.62 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:362.2,362.66 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:365.2,365.66 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:369.2,369.49 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:356.57,358.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:359.62,361.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:362.66,364.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:365.66,367.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:372.49,373.40 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:376.2,377.16 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:380.2,380.12 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:373.40,375.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:377.16,379.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:383.48,384.9 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:387.2,387.12 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:384.9,386.3 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:392.50,401.33 3 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:401.33,403.3 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:407.61,409.16 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:412.2,412.34 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:409.16,411.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:412.34,414.17 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:417.3,418.17 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:414.17,416.4 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:418.17,420.4 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:424.28,426.24 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:429.2,429.13 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/flags/flags.go:426.24,428.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/helpers/helpers.go:9.60,12.16 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/helpers/helpers.go:15.2,19.28 4 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/helpers/helpers.go:12.16,14.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/helpers/helpers.go:23.57,25.16 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/helpers/helpers.go:29.2,29.67 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/helpers/helpers.go:33.2,33.16 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/helpers/helpers.go:36.2,36.22 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/helpers/helpers.go:25.16,27.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/helpers/helpers.go:29.67,31.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/helpers/helpers.go:33.16,35.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:16.46,23.16 5 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:27.2,31.16 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:34.2,34.26 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:53.2,53.10 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:23.16,25.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:31.16,33.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:34.26,36.12 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:50.3,50.32 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:37.18,38.47 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:39.18,40.47 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:41.20,42.49 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:43.19,44.48 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:45.21,46.50 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:47.11,48.49 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:57.40,58.28 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:58.28,60.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:64.39,65.28 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:65.28,67.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:71.28,72.28 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/notifier.go:72.28,74.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:36.86,41.16 4 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:45.2,59.10 4 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:41.16,43.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:62.49,63.30 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:74.2,74.16 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:63.30,66.28 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:66.28,67.18 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:67.18,70.5 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:77.74,79.59 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:83.2,83.22 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:79.59,81.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:86.66,89.2 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:91.52,92.22 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:92.22,94.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:97.51,98.45 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:102.2,103.17 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:98.45,100.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:106.40,113.2 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:115.53,117.2 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:119.61,120.22 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:126.2,126.12 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:120.22,122.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:122.8,125.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:129.63,144.35 5 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:152.2,152.16 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:160.2,160.35 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:164.2,164.12 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:144.35,146.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:152.16,154.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/shoutrrr.go:160.35,162.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/slack.go:18.83,40.2 9 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/slack.go:42.50,42.51 0 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/slack.go:44.49,44.50 0 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/slack.go:46.38,46.39 0 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:33.110,35.16 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:38.2,39.44 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:42.2,42.42 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:49.2,49.14 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:56.2,56.36 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:59.2,59.26 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:64.2,65.16 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:68.2,69.16 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:72.2,73.16 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:76.2,76.17 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:35.16,37.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:39.44,41.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:42.42,45.43 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:45.43,47.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:49.14,50.39 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:50.39,51.35 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:51.35,53.5 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:56.36,58.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:59.26,60.37 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:60.37,62.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:65.16,67.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:69.16,71.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/smtp.go:73.16,75.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/util.go:7.42,13.26 5 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/util.go:23.2,23.13 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/util.go:13.26,15.19 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/util.go:15.19,18.4 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/util.go:18.9,18.26 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/util.go:18.26,20.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:36.83,65.2 13 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:67.71,70.24 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:75.2,75.48 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:78.2,79.32 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:84.2,96.27 11 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:100.2,102.50 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:106.2,106.24 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:70.24,72.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:72.8,74.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:75.48,77.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:79.32,82.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:96.27,98.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:102.50,104.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:109.63,112.12 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:112.12,113.18 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:117.3,118.19 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:121.3,122.17 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:113.18,115.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:118.19,120.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:122.17,125.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:129.49,130.22 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:130.22,132.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:135.48,136.45 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:140.2,141.17 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:136.45,138.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:144.50,146.2 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:148.58,149.22 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:154.2,154.12 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:149.22,151.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:151.8,153.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/email.go:157.38,157.39 0 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:27.84,31.24 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:39.2,40.26 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:44.2,55.10 4 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:31.24,33.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:33.8,33.99 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:33.99,35.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:35.8,35.52 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:35.52,37.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:40.26,42.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:58.51,58.52 0 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:60.50,60.51 0 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:62.39,62.40 0 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:64.51,66.2 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:68.46,70.34 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:73.2,73.50 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:70.34,72.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:76.59,78.12 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:110.2,110.12 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:78.12,84.17 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:90.3,99.17 4 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:103.3,105.54 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:84.17,87.4 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:99.17,102.4 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/gotify.go:105.54,107.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:25.87,30.26 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:34.2,43.10 4 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:30.26,32.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:46.52,46.53 0 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:48.51,48.52 0 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:50.40,50.41 0 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:52.52,54.2 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:56.60,60.12 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:111.2,111.12 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:60.12,68.57 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:86.3,87.17 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:92.3,93.17 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:97.3,99.53 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:68.57,75.33 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:83.4,83.56 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:75.33,81.5 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:87.17,90.4 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:93.17,95.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:99.53,101.24 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:101.24,103.19 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/notifications/msteams.go:103.19,106.6 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/registry.go:9.71,12.16 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/registry.go:16.2,16.16 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/registry.go:19.2,24.8 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/registry.go:12.16,14.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/registry.go:16.16,18.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/registry.go:30.43,33.2 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:20.46,22.16 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:25.2,25.18 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:22.16,24.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:31.49,34.38 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:43.2,43.93 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:34.38,42.3 4 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:50.52,52.16 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:56.2,57.21 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:60.2,61.16 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:65.2,68.34 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:72.2,74.25 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:52.16,55.3 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:57.21,59.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:61.16,64.3 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:68.34,71.3 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:78.53,81.16 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:85.2,86.22 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:81.16,83.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:91.75,92.39 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:95.2,95.46 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:92.39,94.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/trust.go:99.56,101.2 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/manifest/manifest.go:13.68,17.16 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/manifest/manifest.go:21.2,22.16 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/manifest/manifest.go:25.2,31.26 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/manifest/manifest.go:17.16,19.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/manifest/manifest.go:22.16,24.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/manifest/manifest.go:34.71,37.46 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/manifest/manifest.go:45.2,45.17 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/manifest/manifest.go:37.46,41.3 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/manifest/manifest.go:41.8,44.3 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:16.97,21.2 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:33.57,35.2 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:38.32,40.2 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:45.37,47.2 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:50.34,52.2 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:56.37,58.2 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:63.39,66.9 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:70.2,70.39 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:74.2,74.18 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:66.9,68.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:70.39,72.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:79.43,81.9 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:85.2,86.16 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:90.2,90.25 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:81.9,83.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:86.16,88.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:95.41,97.9 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:101.2,102.16 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:106.2,106.19 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:97.9,99.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:102.16,104.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:111.43,113.9 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:117.2,117.24 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:113.9,115.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:122.37,127.31 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:132.2,132.69 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:139.2,139.14 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:127.31,130.3 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:132.69,133.57 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:133.57,136.4 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:144.37,146.2 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:152.40,154.2 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:161.43,168.29 5 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:172.2,172.16 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:168.29,170.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:178.40,180.2 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:193.60,198.49 4 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:202.2,202.37 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:206.2,206.42 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:210.2,210.64 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:217.2,224.37 4 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:229.2,229.57 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:233.2,234.15 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:198.49,200.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:202.37,204.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:206.42,208.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:210.64,212.51 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:212.51,214.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:224.37,225.47 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:225.47,227.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:229.57,231.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:239.61,242.40 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:249.2,249.19 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:242.40,247.3 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:253.40,255.2 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/container.go:257.52,259.2 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/metadata.go:19.57,21.2 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/metadata.go:24.58,26.2 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/metadata.go:29.58,31.2 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/metadata.go:34.59,36.2 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/metadata.go:40.61,43.2 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/metadata.go:45.62,46.57 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/metadata.go:49.2,49.11 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/metadata.go:46.57,48.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/metadata.go:52.63,55.2 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:43.101,46.16 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:50.2,56.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:46.16,48.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:67.77,71.27 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:77.2,84.16 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:88.2,88.46 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:100.2,100.16 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:71.27,73.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:73.8,75.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:84.16,86.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:88.46,91.17 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:95.3,95.12 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:91.17,93.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:95.12,97.4 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:103.60,107.27 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:112.2,112.19 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:107.27,110.3 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:115.80,119.16 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:123.2,124.16 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:128.2,128.77 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:119.16,121.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:124.16,126.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:131.84,134.18 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:138.2,138.19 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:146.2,148.43 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:159.2,159.64 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:163.2,163.12 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:134.18,136.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:138.19,140.70 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:140.70,142.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:148.43,150.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:150.8,153.144 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:153.144,155.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:159.64,161.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:166.72,173.58 5 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:183.2,187.16 4 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:191.2,191.40 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:209.2,209.45 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:213.2,213.78 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:173.58,175.51 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:180.3,180.65 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:175.51,178.9 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:187.16,189.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:191.40,193.54 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:200.3,200.51 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:193.54,195.18 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:195.18,197.5 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:200.51,202.18 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:202.18,204.5 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:209.45,211.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:217.131,222.16 4 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:225.2,225.12 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:222.16,224.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:228.79,232.2 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:234.80,237.24 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:243.2,243.43 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:237.24,239.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:239.8,239.64 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:239.64,241.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:246.96,251.16 4 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:255.2,255.35 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:260.2,261.18 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:251.16,253.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:255.35,258.3 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:264.86,275.16 6 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:280.2,281.86 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:288.2,291.16 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:296.2,298.51 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:302.2,302.12 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:275.16,278.3 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:281.86,283.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:283.8,283.18 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:283.18,286.3 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:291.16,294.3 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:298.51,301.3 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:305.61,316.2 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:318.98,329.16 4 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:333.2,337.22 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:342.2,344.16 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:348.2,349.22 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:362.2,363.16 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:367.2,367.12 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:329.16,331.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:337.22,339.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:344.16,346.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:349.22,353.17 4 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:353.17,355.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:355.9,355.25 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:355.25,357.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:363.16,365.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:370.118,374.17 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:381.2,381.6 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:406.2,406.12 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:374.17,377.3 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:377.8,379.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:381.6,390.17 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:393.3,393.34 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:397.3,397.26 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:400.3,400.31 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:404.3,404.8 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:390.17,392.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:393.34,395.12 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:397.26,399.4 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:400.31,403.4 2 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:409.92,413.6 3 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:413.6,414.10 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:424.3,424.30 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:415.18,416.14 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:417.11,418.70 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:418.70,420.5 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:420.10,420.32 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/container/client.go:420.32,422.5 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:24.121,30.49 5 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:34.2,35.53 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:39.2,41.43 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:45.2,52.43 4 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:55.2,55.44 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:60.2,60.67 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:30.49,32.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:35.53,37.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:41.43,43.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:52.43,54.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:55.44,58.3 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:64.63,67.16 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:70.2,72.17 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:67.16,69.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:76.139,81.16 4 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:85.2,86.72 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:90.2,90.62 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:97.2,98.50 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:102.2,106.16 4 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:110.2,110.33 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:81.16,83.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:86.72,88.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:90.62,93.3 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:93.8,95.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:98.50,100.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:106.16,108.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:114.66,120.29 5 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:128.2,128.79 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:132.2,140.21 8 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:120.29,126.3 5 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:128.79,130.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:144.52,147.16 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:151.2,156.17 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/auth/auth.go:147.16,149.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:24.124,28.16 4 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:32.2,33.16 2 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:37.2,37.64 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:41.2,44.24 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:48.2,48.40 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:56.2,56.19 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:28.16,30.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:33.16,35.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:37.64,39.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:44.24,46.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:48.40,51.28 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:51.28,53.4 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:60.79,63.17 3 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:69.2,75.16 6 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:78.2,78.27 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:81.2,81.49 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:63.17,65.3 1 1
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:65.8,67.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:75.16,77.3 1 0
|
||||||
|
github.com/containrrr/watchtower/pkg/registry/digest/digest.go:78.27,80.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:24.101,28.16 3 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:33.2,33.26 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:38.2,39.62 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:28.16,31.3 2 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:33.26,36.3 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:42.110,49.44 5 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:66.2,66.64 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:49.44,50.65 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:57.3,57.14 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:50.65,54.12 3 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:57.14,58.62 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:58.62,62.5 2 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:69.55,70.22 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:74.2,76.11 2 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:79.2,79.11 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:82.2,82.36 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:70.22,72.3 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:76.11,78.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:79.11,81.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/check.go:85.26,88.2 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:17.71,20.27 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:24.2,25.16 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:29.2,29.45 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:41.2,42.16 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:46.2,49.25 3 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:57.2,57.27 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:63.2,63.27 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:66.2,66.12 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:20.27,22.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:25.16,27.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:29.45,31.127 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:34.3,34.17 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:38.3,38.30 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:31.127,33.4 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:34.17,37.4 2 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:42.16,44.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:49.25,50.45 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:50.45,51.38 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:51.38,53.5 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:57.27,59.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:59.8,62.3 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:63.27,65.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:69.114,72.44 2 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:79.2,79.20 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:72.44,73.26 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:73.26,76.4 2 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:79.20,81.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:84.122,85.44 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:85.44,87.3 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:90.108,91.30 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:96.2,96.22 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:99.2,99.27 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:107.2,107.72 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:91.30,94.3 2 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:96.22,98.3 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:99.27,100.78 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:100.78,104.4 3 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:107.72,109.3 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:112.123,115.44 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:123.2,123.20 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:115.44,116.28 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:119.3,120.44 2 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:116.28,117.12 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:123.20,125.3 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:128.71,129.32 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:129.32,130.57 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:130.57,132.4 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:136.111,141.30 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:148.2,148.23 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:141.30,142.76 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:142.76,145.4 2 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:148.23,149.74 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:149.74,151.4 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:151.9,151.54 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:151.54,153.4 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:157.58,159.36 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:159.36,160.25 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:164.2,165.43 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:160.25,161.12 1 1
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:165.43,166.37 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:166.37,167.54 1 0
|
||||||
|
github.com/containrrr/watchtower/internal/actions/update.go:167.54,169.20 2 0
|
@ -0,0 +1,168 @@
|
|||||||
|
package auth
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"github.com/containrrr/watchtower/pkg/registry/helpers"
|
||||||
|
"github.com/containrrr/watchtower/pkg/types"
|
||||||
|
"github.com/docker/distribution/reference"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
"io/ioutil"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ChallengeHeader is the HTTP Header containing challenge instructions
|
||||||
|
const ChallengeHeader = "WWW-Authenticate"
|
||||||
|
|
||||||
|
// GetToken fetches a token for the registry hosting the provided image
|
||||||
|
func GetToken(container types.Container, registryAuth string) (string, error) {
|
||||||
|
var err error
|
||||||
|
var URL url.URL
|
||||||
|
|
||||||
|
if URL, err = GetChallengeURL(container.ImageName()); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
logrus.WithField("URL", URL.String()).Debug("Building challenge URL")
|
||||||
|
|
||||||
|
var req *http.Request
|
||||||
|
if req, err = GetChallengeRequest(URL); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
client := &http.Client{}
|
||||||
|
var res *http.Response
|
||||||
|
if res, err = client.Do(req); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
v := res.Header.Get(ChallengeHeader)
|
||||||
|
|
||||||
|
logrus.WithFields(logrus.Fields{
|
||||||
|
"status": res.Status,
|
||||||
|
"header": v,
|
||||||
|
}).Debug("Got response to challenge request")
|
||||||
|
|
||||||
|
challenge := strings.ToLower(v)
|
||||||
|
if strings.HasPrefix(challenge, "basic") {
|
||||||
|
if registryAuth == "" {
|
||||||
|
return "", fmt.Errorf("no credentials available")
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Sprintf("Basic %s", registryAuth), nil
|
||||||
|
}
|
||||||
|
if strings.HasPrefix(challenge, "bearer") {
|
||||||
|
return GetBearerHeader(challenge, container.ImageName(), err, registryAuth)
|
||||||
|
}
|
||||||
|
|
||||||
|
return "", errors.New("unsupported challenge type from registry")
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetChallengeRequest creates a request for getting challenge instructions
|
||||||
|
func GetChallengeRequest(URL url.URL) (*http.Request, error) {
|
||||||
|
req, err := http.NewRequest("GET", URL.String(), nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
req.Header.Set("Accept", "*/*")
|
||||||
|
req.Header.Set("User-Agent", "Watchtower (Docker)")
|
||||||
|
return req, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetBearerHeader tries to fetch a bearer token from the registry based on the challenge instructions
|
||||||
|
func GetBearerHeader(challenge string, img string, err error, registryAuth string) (string, error) {
|
||||||
|
client := http.Client{}
|
||||||
|
if strings.Contains(img, ":") {
|
||||||
|
img = strings.Split(img, ":")[0]
|
||||||
|
}
|
||||||
|
authURL, err := GetAuthURL(challenge, img)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
var r *http.Request
|
||||||
|
if r, err = http.NewRequest("GET", authURL.String(), nil); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
if registryAuth != "" {
|
||||||
|
logrus.WithField("credentials", registryAuth).Debug("Credentials found.")
|
||||||
|
r.Header.Add("Authorization", fmt.Sprintf("Basic %s", registryAuth))
|
||||||
|
} else {
|
||||||
|
logrus.Debug("No credentials found.")
|
||||||
|
}
|
||||||
|
|
||||||
|
var authResponse *http.Response
|
||||||
|
if authResponse, err = client.Do(r); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
body, _ := ioutil.ReadAll(authResponse.Body)
|
||||||
|
tokenResponse := &types.TokenResponse{}
|
||||||
|
|
||||||
|
err = json.Unmarshal(body, tokenResponse)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Sprintf("Bearer %s", tokenResponse.Token), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetAuthURL from the instructions in the challenge
|
||||||
|
func GetAuthURL(challenge string, img string) (*url.URL, error) {
|
||||||
|
loweredChallenge := strings.ToLower(challenge)
|
||||||
|
raw := strings.TrimPrefix(loweredChallenge, "bearer")
|
||||||
|
|
||||||
|
pairs := strings.Split(raw, ",")
|
||||||
|
values := make(map[string]string, len(pairs))
|
||||||
|
|
||||||
|
for _, pair := range pairs {
|
||||||
|
trimmed := strings.Trim(pair, " ")
|
||||||
|
kv := strings.Split(trimmed, "=")
|
||||||
|
key := kv[0]
|
||||||
|
val := strings.Trim(kv[1], "\"")
|
||||||
|
values[key] = val
|
||||||
|
}
|
||||||
|
logrus.WithFields(logrus.Fields{
|
||||||
|
"realm": values["realm"],
|
||||||
|
"service": values["service"],
|
||||||
|
}).Debug("Checking challenge header content")
|
||||||
|
if values["realm"] == "" || values["service"] == "" {
|
||||||
|
|
||||||
|
return nil, fmt.Errorf("challenge header did not include all values needed to construct an auth url")
|
||||||
|
}
|
||||||
|
|
||||||
|
authURL, _ := url.Parse(fmt.Sprintf("%s", values["realm"]))
|
||||||
|
q := authURL.Query()
|
||||||
|
q.Add("service", values["service"])
|
||||||
|
scopeImage := strings.TrimPrefix(img, values["service"])
|
||||||
|
if !strings.Contains(scopeImage, "/") {
|
||||||
|
scopeImage = "library/" + scopeImage
|
||||||
|
}
|
||||||
|
scope := fmt.Sprintf("repository:%s:pull", scopeImage)
|
||||||
|
logrus.WithFields(logrus.Fields{"scope": scope, "image": img}).Debug("Setting scope for auth token")
|
||||||
|
q.Add("scope", scope)
|
||||||
|
|
||||||
|
authURL.RawQuery = q.Encode()
|
||||||
|
return authURL, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetChallengeURL creates a URL object based on the image info
|
||||||
|
func GetChallengeURL(img string) (url.URL, error) {
|
||||||
|
|
||||||
|
normalizedNamed, _ := reference.ParseNormalizedNamed(img)
|
||||||
|
host, err := helpers.NormalizeRegistry(normalizedNamed.String())
|
||||||
|
if err != nil {
|
||||||
|
return url.URL{}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
URL := url.URL{
|
||||||
|
Scheme: "https",
|
||||||
|
Host: host,
|
||||||
|
Path: "/v2/",
|
||||||
|
}
|
||||||
|
return URL, nil
|
||||||
|
}
|
@ -0,0 +1,98 @@
|
|||||||
|
package auth_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/containrrr/watchtower/internal/actions/mocks"
|
||||||
|
"github.com/containrrr/watchtower/pkg/registry/auth"
|
||||||
|
"net/url"
|
||||||
|
"os"
|
||||||
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
wtTypes "github.com/containrrr/watchtower/pkg/types"
|
||||||
|
. "github.com/onsi/ginkgo"
|
||||||
|
. "github.com/onsi/gomega"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestAuth(t *testing.T) {
|
||||||
|
RegisterFailHandler(Fail)
|
||||||
|
RunSpecs(t, "Registry Auth Suite")
|
||||||
|
}
|
||||||
|
func SkipIfCredentialsEmpty(credentials *wtTypes.RegistryCredentials, fn func()) func() {
|
||||||
|
if credentials.Username == "" {
|
||||||
|
return func() {
|
||||||
|
Skip("Username missing. Skipping integration test")
|
||||||
|
}
|
||||||
|
} else if credentials.Password == "" {
|
||||||
|
return func() {
|
||||||
|
Skip("Password missing. Skipping integration test")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return fn
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var GHCRCredentials = &wtTypes.RegistryCredentials{
|
||||||
|
Username: os.Getenv("CI_INTEGRATION_TEST_REGISTRY_GH_USERNAME"),
|
||||||
|
Password: os.Getenv("CI_INTEGRATION_TEST_REGISTRY_GH_PASSWORD"),
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ = Describe("the auth module", func() {
|
||||||
|
mockId := "mock-id"
|
||||||
|
mockName := "mock-container"
|
||||||
|
mockImage := "ghcr.io/k6io/operator:latest"
|
||||||
|
mockCreated := time.Now()
|
||||||
|
mockDigest := "ghcr.io/k6io/operator@sha256:d68e1e532088964195ad3a0a71526bc2f11a78de0def85629beb75e2265f0547"
|
||||||
|
|
||||||
|
mockContainer := mocks.CreateMockContainerWithDigest(
|
||||||
|
mockId,
|
||||||
|
mockName,
|
||||||
|
mockImage,
|
||||||
|
mockCreated,
|
||||||
|
mockDigest)
|
||||||
|
|
||||||
|
When("getting an auth url", func() {
|
||||||
|
It("should parse the token from the response",
|
||||||
|
SkipIfCredentialsEmpty(GHCRCredentials, func() {
|
||||||
|
creds := fmt.Sprintf("%s:%s", GHCRCredentials.Username, GHCRCredentials.Password)
|
||||||
|
token, err := auth.GetToken(mockContainer, creds)
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
Expect(token).NotTo(Equal(""))
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
It("should create a valid auth url object based on the challenge header supplied", func() {
|
||||||
|
input := `bearer realm="https://ghcr.io/token",service="ghcr.io",scope="repository:user/image:pull"`
|
||||||
|
expected := &url.URL{
|
||||||
|
Host: "ghcr.io",
|
||||||
|
Scheme: "https",
|
||||||
|
Path: "/token",
|
||||||
|
RawQuery: "scope=repository%3Acontainrrr%2Fwatchtower%3Apull&service=ghcr.io",
|
||||||
|
}
|
||||||
|
res, err := auth.GetAuthURL(input, "containrrr/watchtower")
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
Expect(res).To(Equal(expected))
|
||||||
|
})
|
||||||
|
It("should create a valid auth url object based on the challenge header supplied", func() {
|
||||||
|
input := `bearer realm="https://ghcr.io/token"`
|
||||||
|
res, err := auth.GetAuthURL(input, "containrrr/watchtower")
|
||||||
|
Expect(err).To(HaveOccurred())
|
||||||
|
Expect(res).To(BeNil())
|
||||||
|
})
|
||||||
|
})
|
||||||
|
When("getting a challenge url", func() {
|
||||||
|
It("should create a valid challenge url object based on the image ref supplied", func() {
|
||||||
|
expected := url.URL{Host: "ghcr.io", Scheme: "https", Path: "/v2/"}
|
||||||
|
Expect(auth.GetChallengeURL("ghcr.io/containrrr/watchtower:latest")).To(Equal(expected))
|
||||||
|
})
|
||||||
|
It("should assume dockerhub if the image ref is not fully qualified", func() {
|
||||||
|
expected := url.URL{Host: "index.docker.io", Scheme: "https", Path: "/v2/"}
|
||||||
|
Expect(auth.GetChallengeURL("containrrr/watchtower:latest")).To(Equal(expected))
|
||||||
|
})
|
||||||
|
It("should convert legacy dockerhub hostnames to index.docker.io", func() {
|
||||||
|
expected := url.URL{Host: "index.docker.io", Scheme: "https", Path: "/v2/"}
|
||||||
|
Expect(auth.GetChallengeURL("docker.io/containrrr/watchtower:latest")).To(Equal(expected))
|
||||||
|
Expect(auth.GetChallengeURL("registry-1.docker.io/containrrr/watchtower:latest")).To(Equal(expected))
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
@ -0,0 +1,98 @@
|
|||||||
|
package digest
|
||||||
|
|
||||||
|
import (
|
||||||
|
"crypto/tls"
|
||||||
|
"encoding/base64"
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"github.com/containrrr/watchtower/pkg/registry/auth"
|
||||||
|
"github.com/containrrr/watchtower/pkg/registry/manifest"
|
||||||
|
"github.com/containrrr/watchtower/pkg/types"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ContentDigestHeader is the key for the key-value pair containing the digest header
|
||||||
|
const ContentDigestHeader = "Docker-Content-Digest"
|
||||||
|
|
||||||
|
// CompareDigest ...
|
||||||
|
func CompareDigest(container types.Container, registryAuth string) (bool, error) {
|
||||||
|
var digest string
|
||||||
|
|
||||||
|
registryAuth = TransformAuth(registryAuth)
|
||||||
|
token, err := auth.GetToken(container, registryAuth)
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
digestURL, err := manifest.BuildManifestURL(container)
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if digest, err = GetDigest(digestURL, token); err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
logrus.WithField("remote", digest).Debug("Found a remote digest to compare with")
|
||||||
|
|
||||||
|
for _, dig := range container.ImageInfo().RepoDigests {
|
||||||
|
localDigest := strings.Split(dig, "@")[1]
|
||||||
|
fields := logrus.Fields{"local": localDigest, "remote": digest}
|
||||||
|
logrus.WithFields(fields).Debug("Comparing")
|
||||||
|
|
||||||
|
if localDigest == digest {
|
||||||
|
logrus.Debug("Found a match")
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// TransformAuth from a base64 encoded json object to base64 encoded string
|
||||||
|
func TransformAuth(registryAuth string) string {
|
||||||
|
b, _ := base64.StdEncoding.DecodeString(registryAuth)
|
||||||
|
credentials := &types.RegistryCredentials{}
|
||||||
|
_ = json.Unmarshal(b, credentials)
|
||||||
|
|
||||||
|
if credentials.Username != "" && credentials.Password != "" {
|
||||||
|
ba := []byte(fmt.Sprintf("%s:%s", credentials.Username, credentials.Password))
|
||||||
|
registryAuth = base64.StdEncoding.EncodeToString(ba)
|
||||||
|
}
|
||||||
|
|
||||||
|
return registryAuth
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDigest from registry using a HEAD request to prevent rate limiting
|
||||||
|
func GetDigest(url string, token string) (string, error) {
|
||||||
|
tr := &http.Transport{
|
||||||
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||||
|
}
|
||||||
|
client := &http.Client{Transport: tr}
|
||||||
|
|
||||||
|
if token != "" {
|
||||||
|
logrus.WithField("token", token).Trace("Setting request token")
|
||||||
|
} else {
|
||||||
|
return "", errors.New("could not fetch token")
|
||||||
|
}
|
||||||
|
|
||||||
|
req, _ := http.NewRequest("HEAD", url, nil)
|
||||||
|
req.Header.Add("Authorization", token)
|
||||||
|
req.Header.Add("Accept", "application/vnd.docker.distribution.manifest.v2+json")
|
||||||
|
req.Header.Add("Accept", "application/vnd.docker.distribution.manifest.list.v2+json")
|
||||||
|
req.Header.Add("Accept", "application/vnd.docker.distribution.manifest.v1+json")
|
||||||
|
|
||||||
|
logrus.WithField("url", url).Debug("Doing a HEAD request to fetch a digest")
|
||||||
|
|
||||||
|
res, err := client.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
if res.StatusCode != 200 {
|
||||||
|
return "", fmt.Errorf("registry responded to head request with %d", res.StatusCode)
|
||||||
|
}
|
||||||
|
return res.Header.Get(ContentDigestHeader), nil
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package digest_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/containrrr/watchtower/internal/actions/mocks"
|
||||||
|
"github.com/containrrr/watchtower/pkg/registry/digest"
|
||||||
|
wtTypes "github.com/containrrr/watchtower/pkg/types"
|
||||||
|
. "github.com/onsi/ginkgo"
|
||||||
|
. "github.com/onsi/gomega"
|
||||||
|
"os"
|
||||||
|
"testing"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestDigest(t *testing.T) {
|
||||||
|
|
||||||
|
RegisterFailHandler(Fail)
|
||||||
|
RunSpecs(GinkgoT(), "Digest Suite")
|
||||||
|
}
|
||||||
|
|
||||||
|
var DockerHubCredentials = &wtTypes.RegistryCredentials{
|
||||||
|
Username: os.Getenv("CI_INTEGRATION_TEST_REGISTRY_DH_USERNAME"),
|
||||||
|
Password: os.Getenv("CI_INTEGRATION_TEST_REGISTRY_DH_PASSWORD"),
|
||||||
|
}
|
||||||
|
var GHCRCredentials = &wtTypes.RegistryCredentials{
|
||||||
|
Username: os.Getenv("CI_INTEGRATION_TEST_REGISTRY_GH_USERNAME"),
|
||||||
|
Password: os.Getenv("CI_INTEGRATION_TEST_REGISTRY_GH_PASSWORD"),
|
||||||
|
}
|
||||||
|
|
||||||
|
func SkipIfCredentialsEmpty(credentials *wtTypes.RegistryCredentials, fn func()) func() {
|
||||||
|
if credentials.Username == "" {
|
||||||
|
return func() {
|
||||||
|
Skip("Username missing. Skipping integration test")
|
||||||
|
}
|
||||||
|
} else if credentials.Password == "" {
|
||||||
|
return func() {
|
||||||
|
Skip("Password missing. Skipping integration test")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return fn
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ = Describe("Digests", func() {
|
||||||
|
mockId := "mock-id"
|
||||||
|
mockName := "mock-container"
|
||||||
|
mockImage := "ghcr.io/k6io/operator:latest"
|
||||||
|
mockCreated := time.Now()
|
||||||
|
mockDigest := "ghcr.io/k6io/operator@sha256:d68e1e532088964195ad3a0a71526bc2f11a78de0def85629beb75e2265f0547"
|
||||||
|
|
||||||
|
mockContainer := mocks.CreateMockContainerWithDigest(
|
||||||
|
mockId,
|
||||||
|
mockName,
|
||||||
|
mockImage,
|
||||||
|
mockCreated,
|
||||||
|
mockDigest)
|
||||||
|
|
||||||
|
When("a digest comparison is done", func() {
|
||||||
|
It("should return true if digests match",
|
||||||
|
SkipIfCredentialsEmpty(GHCRCredentials, func() {
|
||||||
|
creds := fmt.Sprintf("%s:%s", GHCRCredentials.Username, GHCRCredentials.Password)
|
||||||
|
matches, err := digest.CompareDigest(mockContainer, creds)
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
Expect(matches).To(Equal(true))
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
It("should return false if digests differ", func() {
|
||||||
|
|
||||||
|
})
|
||||||
|
It("should return an error if the registry isn't available", func() {
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
|
When("using different registries", func() {
|
||||||
|
It("should work with DockerHub",
|
||||||
|
SkipIfCredentialsEmpty(DockerHubCredentials, func() {
|
||||||
|
fmt.Println(DockerHubCredentials != nil) // to avoid crying linters
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
It("should work with GitHub Container Registry",
|
||||||
|
SkipIfCredentialsEmpty(GHCRCredentials, func() {
|
||||||
|
fmt.Println(GHCRCredentials != nil) // to avoid crying linters
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
})
|
@ -0,0 +1,36 @@
|
|||||||
|
package helpers
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
url2 "net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ConvertToHostname strips a url from everything but the hostname part
|
||||||
|
func ConvertToHostname(url string) (string, string, error) {
|
||||||
|
urlWithSchema := fmt.Sprintf("x://%s", url)
|
||||||
|
u, err := url2.Parse(urlWithSchema)
|
||||||
|
if err != nil {
|
||||||
|
return "", "", err
|
||||||
|
}
|
||||||
|
hostName := u.Hostname()
|
||||||
|
port := u.Port()
|
||||||
|
|
||||||
|
return hostName, port, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// NormalizeRegistry makes sure variations of DockerHubs registry
|
||||||
|
func NormalizeRegistry(registry string) (string, error) {
|
||||||
|
hostName, port, err := ConvertToHostname(registry)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
if hostName == "registry-1.docker.io" || hostName == "docker.io" {
|
||||||
|
hostName = "index.docker.io"
|
||||||
|
}
|
||||||
|
|
||||||
|
if port != "" {
|
||||||
|
return fmt.Sprintf("%s:%s", hostName, port), nil
|
||||||
|
}
|
||||||
|
return hostName, nil
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package helpers
|
||||||
|
|
||||||
|
import (
|
||||||
|
. "github.com/onsi/ginkgo"
|
||||||
|
. "github.com/onsi/gomega"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestHelpers(t *testing.T) {
|
||||||
|
RegisterFailHandler(Fail)
|
||||||
|
RunSpecs(t, "Helper Suite")
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ = Describe("the helpers", func() {
|
||||||
|
|
||||||
|
When("converting an url to a hostname", func() {
|
||||||
|
It("should return docker.io given docker.io/containrrr/watchtower:latest", func() {
|
||||||
|
host, port, err := ConvertToHostname("docker.io/containrrr/watchtower:latest")
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
Expect(host).To(Equal("docker.io"))
|
||||||
|
Expect(port).To(BeEmpty())
|
||||||
|
})
|
||||||
|
})
|
||||||
|
When("normalizing the registry information", func() {
|
||||||
|
It("should return index.docker.io given docker.io", func() {
|
||||||
|
out, err := NormalizeRegistry("docker.io/containrrr/watchtower:latest")
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
Expect(out).To(Equal("index.docker.io"))
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
@ -0,0 +1,64 @@
|
|||||||
|
package manifest
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/containrrr/watchtower/pkg/registry/helpers"
|
||||||
|
"github.com/containrrr/watchtower/pkg/types"
|
||||||
|
ref "github.com/docker/distribution/reference"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
url2 "net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// BuildManifestURL from raw image data
|
||||||
|
func BuildManifestURL(container types.Container) (string, error) {
|
||||||
|
|
||||||
|
normalizedName, err := ref.ParseNormalizedNamed(container.ImageName())
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
host, err := helpers.NormalizeRegistry(normalizedName.String())
|
||||||
|
img, tag := extractImageAndTag(strings.TrimPrefix(container.ImageName(), host+"/"))
|
||||||
|
|
||||||
|
logrus.WithFields(logrus.Fields{
|
||||||
|
"image": img,
|
||||||
|
"tag": tag,
|
||||||
|
"normalized": normalizedName,
|
||||||
|
"host": host,
|
||||||
|
}).Debug("Parsing image ref")
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
img = strings.TrimPrefix(img, fmt.Sprintf("%s/", host))
|
||||||
|
if !strings.Contains(img, "/") {
|
||||||
|
img = "library/" + img
|
||||||
|
}
|
||||||
|
url := url2.URL{
|
||||||
|
Scheme: "https",
|
||||||
|
Host: host,
|
||||||
|
Path: fmt.Sprintf("/v2/%s/manifests/%s", img, tag),
|
||||||
|
}
|
||||||
|
return url.String(), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func extractImageAndTag(imageName string) (string, string) {
|
||||||
|
var img string
|
||||||
|
var tag string
|
||||||
|
|
||||||
|
if strings.Contains(imageName, ":") {
|
||||||
|
parts := strings.Split(imageName, ":")
|
||||||
|
if len(parts) > 2 {
|
||||||
|
img = fmt.Sprintf("%s%s", parts[0], parts[1])
|
||||||
|
tag = parts[3]
|
||||||
|
} else {
|
||||||
|
img = parts[0]
|
||||||
|
tag = parts[1]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
img = imageName
|
||||||
|
tag = "latest"
|
||||||
|
}
|
||||||
|
return img, tag
|
||||||
|
}
|
@ -0,0 +1,66 @@
|
|||||||
|
package manifest_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/containrrr/watchtower/internal/actions/mocks"
|
||||||
|
"github.com/containrrr/watchtower/pkg/registry/manifest"
|
||||||
|
apiTypes "github.com/docker/docker/api/types"
|
||||||
|
. "github.com/onsi/ginkgo"
|
||||||
|
. "github.com/onsi/gomega"
|
||||||
|
"testing"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestManifest(t *testing.T) {
|
||||||
|
RegisterFailHandler(Fail)
|
||||||
|
RunSpecs(t, "Manifest Suite")
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ = Describe("the manifest module", func() {
|
||||||
|
mockId := "mock-id"
|
||||||
|
mockName := "mock-container"
|
||||||
|
mockCreated := time.Now()
|
||||||
|
|
||||||
|
When("building a manifest url", func() {
|
||||||
|
It("should return a valid url given a fully qualified image", func() {
|
||||||
|
expected := "https://ghcr.io/v2/containrrr/watchtower/manifests/latest"
|
||||||
|
imageInfo := apiTypes.ImageInspect{
|
||||||
|
RepoTags: []string{
|
||||||
|
"ghcr.io/k6io/operator:latest",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
mock := mocks.CreateMockContainerWithImageInfo(mockId, mockName, "ghcr.io/containrrr/watchtower:latest", mockCreated, imageInfo)
|
||||||
|
res, err := manifest.BuildManifestURL(mock)
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
Expect(res).To(Equal(expected))
|
||||||
|
})
|
||||||
|
It("should assume dockerhub for non-qualified images", func() {
|
||||||
|
expected := "https://index.docker.io/v2/containrrr/watchtower/manifests/latest"
|
||||||
|
imageInfo := apiTypes.ImageInspect{
|
||||||
|
RepoTags: []string{
|
||||||
|
"containrrr/watchtower:latest",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
mock := mocks.CreateMockContainerWithImageInfo(mockId, mockName, "containrrr/watchtower:latest", mockCreated, imageInfo)
|
||||||
|
res, err := manifest.BuildManifestURL(mock)
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
Expect(res).To(Equal(expected))
|
||||||
|
})
|
||||||
|
It("should assume latest for images that lack an explicit tag", func() {
|
||||||
|
expected := "https://index.docker.io/v2/containrrr/watchtower/manifests/latest"
|
||||||
|
imageInfo := apiTypes.ImageInspect{
|
||||||
|
|
||||||
|
RepoTags: []string{
|
||||||
|
"containrrr/watchtower",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
mock := mocks.CreateMockContainerWithImageInfo(mockId, mockName, "containrrr/watchtower", mockCreated, imageInfo)
|
||||||
|
|
||||||
|
res, err := manifest.BuildManifestURL(mock)
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
Expect(res).To(Equal(expected))
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
@ -1,59 +1,71 @@
|
|||||||
package registry
|
package registry
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/stretchr/testify/assert"
|
. "github.com/onsi/ginkgo"
|
||||||
|
. "github.com/onsi/gomega"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestEncodedEnvAuth_ShouldReturnAnErrorIfRepoEnvsAreUnset(t *testing.T) {
|
func TestTrust(t *testing.T) {
|
||||||
os.Unsetenv("REPO_USER")
|
RegisterFailHandler(Fail)
|
||||||
os.Unsetenv("REPO_PASS")
|
RunSpecs(t, "Trust Suite")
|
||||||
_, err := EncodedEnvAuth("")
|
|
||||||
assert.Error(t, err)
|
|
||||||
}
|
}
|
||||||
func TestEncodedEnvAuth_ShouldReturnAuthHashIfRepoEnvsAreSet(t *testing.T) {
|
|
||||||
expectedHash := "eyJ1c2VybmFtZSI6ImNvbnRhaW5ycnItdXNlciIsInBhc3N3b3JkIjoiY29udGFpbnJyci1wYXNzIn0="
|
|
||||||
|
|
||||||
os.Setenv("REPO_USER", "containrrr-user")
|
var _ = Describe("Testing with Ginkgo", func() {
|
||||||
os.Setenv("REPO_PASS", "containrrr-pass")
|
It("encoded env auth_ should return an error if repo envs are unset", func() {
|
||||||
config, _ := EncodedEnvAuth("")
|
_ = os.Unsetenv("REPO_USER")
|
||||||
|
_ = os.Unsetenv("REPO_PASS")
|
||||||
|
|
||||||
assert.Equal(t, config, expectedHash)
|
_, err := EncodedEnvAuth("")
|
||||||
}
|
Expect(err).To(HaveOccurred())
|
||||||
|
})
|
||||||
|
It("encoded env auth_ should return auth hash if repo envs are set", func() {
|
||||||
|
var err error
|
||||||
|
expectedHash := "eyJ1c2VybmFtZSI6ImNvbnRhaW5ycnItdXNlciIsInBhc3N3b3JkIjoiY29udGFpbnJyci1wYXNzIn0="
|
||||||
|
|
||||||
func TestEncodedConfigAuth_ShouldReturnAnErrorIfFileIsNotPresent(t *testing.T) {
|
err = os.Setenv("REPO_USER", "containrrr-user")
|
||||||
os.Setenv("DOCKER_CONFIG", "/dev/null/should-fail")
|
Expect(err).NotTo(HaveOccurred())
|
||||||
_, err := EncodedConfigAuth("")
|
|
||||||
assert.Error(t, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
err = os.Setenv("REPO_PASS", "containrrr-pass")
|
||||||
* TODO:
|
Expect(err).NotTo(HaveOccurred())
|
||||||
* This part only confirms that it still works in the same way as it did
|
|
||||||
* with the old version of the docker api client sdk. I'd say that
|
|
||||||
* ParseServerAddress likely needs to be elaborated a bit to default to
|
|
||||||
* dockerhub in case no server address was provided.
|
|
||||||
*
|
|
||||||
* ++ @simskij, 2019-04-04
|
|
||||||
*/
|
|
||||||
|
|
||||||
func TestParseServerAddress_ShouldReturnErrorIfPassedEmptyString(t *testing.T) {
|
|
||||||
_, err := ParseServerAddress("")
|
|
||||||
assert.Error(t, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestParseServerAddress_ShouldReturnTheRepoNameIfPassedAFullyQualifiedImageName(t *testing.T) {
|
config, err := EncodedEnvAuth("")
|
||||||
val, _ := ParseServerAddress("github.com/containrrrr/config")
|
Expect(config).To(Equal(expectedHash))
|
||||||
assert.Equal(t, val, "github.com")
|
Expect(err).NotTo(HaveOccurred())
|
||||||
}
|
})
|
||||||
|
It("encoded config auth_ should return an error if file is not present", func() {
|
||||||
|
var err error
|
||||||
|
|
||||||
func TestParseServerAddress_ShouldReturnTheOrganizationPartIfPassedAnImageNameMissingServerName(t *testing.T) {
|
err = os.Setenv("DOCKER_CONFIG", "/dev/null/should-fail")
|
||||||
val, _ := ParseServerAddress("containrrr/config")
|
Expect(err).NotTo(HaveOccurred())
|
||||||
assert.Equal(t, val, "containrrr")
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestParseServerAddress_ShouldReturnTheServerNameIfPassedAFullyQualifiedImageName(t *testing.T) {
|
_, err = EncodedConfigAuth("")
|
||||||
val, _ := ParseServerAddress("github.com/containrrrr/config")
|
Expect(err).To(HaveOccurred())
|
||||||
assert.Equal(t, val, "github.com")
|
|
||||||
}
|
})
|
||||||
|
/*
|
||||||
|
* TODO:
|
||||||
|
* This part only confirms that it still works in the same way as it did
|
||||||
|
* with the old version of the docker api client sdk. I'd say that
|
||||||
|
* ParseServerAddress likely needs to be elaborated a bit to default to
|
||||||
|
* dockerhub in case no server address was provided.
|
||||||
|
*
|
||||||
|
* ++ @simskij, 2019-04-04
|
||||||
|
*/
|
||||||
|
It("parse server address_ should return error if passed empty string", func() {
|
||||||
|
|
||||||
|
_, err := ParseServerAddress("")
|
||||||
|
Expect(err).To(HaveOccurred())
|
||||||
|
})
|
||||||
|
It("parse server address_ should return the organization part if passed an image name missing server name", func() {
|
||||||
|
|
||||||
|
val, _ := ParseServerAddress("containrrr/config")
|
||||||
|
Expect(val).To(Equal("containrrr"))
|
||||||
|
})
|
||||||
|
It("parse server address_ should return the server name if passed a fully qualified image name", func() {
|
||||||
|
|
||||||
|
val, _ := ParseServerAddress("github.com/containrrrr/config")
|
||||||
|
Expect(val).To(Equal("github.com"))
|
||||||
|
})
|
||||||
|
})
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
package types
|
||||||
|
|
||||||
|
import "github.com/docker/docker/api/types"
|
||||||
|
|
||||||
|
// Container is a docker container running an image
|
||||||
|
type Container interface {
|
||||||
|
ContainerInfo() *types.ContainerJSON
|
||||||
|
ID() string
|
||||||
|
IsRunning() bool
|
||||||
|
Name() string
|
||||||
|
ImageID() string
|
||||||
|
ImageName() string
|
||||||
|
Enabled() (bool, bool)
|
||||||
|
IsMonitorOnly() bool
|
||||||
|
Scope() (string, bool)
|
||||||
|
Links() []string
|
||||||
|
ToRestart() bool
|
||||||
|
IsWatchtower() bool
|
||||||
|
StopSignal() string
|
||||||
|
HasImageInfo() bool
|
||||||
|
ImageInfo() *types.ImageInspect
|
||||||
|
GetLifecyclePreCheckCommand() string
|
||||||
|
GetLifecyclePostCheckCommand() string
|
||||||
|
GetLifecyclePreUpdateCommand() string
|
||||||
|
GetLifecyclePostUpdateCommand() string
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
package types
|
||||||
|
|
||||||
|
// RegistryCredentials is a credential pair used for basic auth
|
||||||
|
type RegistryCredentials struct {
|
||||||
|
Username string
|
||||||
|
Password string // usually a token rather than an actual password
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
package types
|
||||||
|
|
||||||
|
// TokenResponse is returned by the registry on successful authentication
|
||||||
|
type TokenResponse struct {
|
||||||
|
Token string `json:"token"`
|
||||||
|
}
|
Loading…
Reference in New Issue