Skip to content

Commit 3a1fb85

Browse files
authored
tools: in-place image updates (sourcegraph#4019)
1 parent 8dbebf9 commit 3a1fb85

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ require (
1010
github.com/pulumi/pulumi v1.12.0
1111
github.com/sethgrid/pester v1.1.0
1212
github.com/sourcegraph/sourcegraph/enterprise/dev/ci/images v0.0.0-20211005203732-b910fedad1f4
13-
github.com/sourcegraph/update-docker-tags v0.8.0
13+
github.com/sourcegraph/update-docker-tags v0.9.0
1414
github.com/spf13/cobra v1.1.3 // indirect
15-
github.com/stretchr/testify v1.7.0 // indirect
15+
github.com/stretchr/testify v1.7.0
1616
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
1717
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
18-
gotest.tools/v3 v3.0.3
1918
)
2019

2120
replace github.com/Azure/go-autorest => github.com/Azure/go-autorest v12.4.3+incompatible

go.sum

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,8 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9
471471
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
472472
github.com/sourcegraph/sourcegraph/enterprise/dev/ci/images v0.0.0-20211005203732-b910fedad1f4 h1:oY15C/w4FruSERdS0zcOEmPPral2bNksJPoroZHc1Sw=
473473
github.com/sourcegraph/sourcegraph/enterprise/dev/ci/images v0.0.0-20211005203732-b910fedad1f4/go.mod h1:RrAuT1kEkrErj2fmr4f3pPDoBF0ruFBhOSC1yORlv24=
474-
github.com/sourcegraph/update-docker-tags v0.8.0 h1:TlW1kptkWCT/va/+x1In3qBZGkRPLg/aL0b/feqBgII=
475-
github.com/sourcegraph/update-docker-tags v0.8.0/go.mod h1:lCDsoUnk/ASDbm7UxE7tU3qAUhQxA7xykELHXcLeKFM=
474+
github.com/sourcegraph/update-docker-tags v0.9.0 h1:FeqPS1GH5n4KyTha/SpZvDDmrdS4c+N8cQ3xb4Rlb+A=
475+
github.com/sourcegraph/update-docker-tags v0.9.0/go.mod h1:lCDsoUnk/ASDbm7UxE7tU3qAUhQxA7xykELHXcLeKFM=
476476
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
477477
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
478478
github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg=
@@ -729,7 +729,6 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn
729729
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
730730
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
731731
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
732-
golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
733732
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
734733
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
735734
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
@@ -927,8 +926,6 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
927926
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
928927
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
929928
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
930-
gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
931-
gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8=
932929
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
933930
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
934931
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

tools/enforce-tags/main.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ func main() {
2222
"run",
2323
"github.com/sourcegraph/update-docker-tags",
2424
}
25-
for _, image := range images.SourcegraphDockerImages {
26-
args = append(args, fmt.Sprintf("-enforce=sourcegraph/%s=%s", image, constraint))
25+
for _, image := range images.DeploySourcegraphDockerImages {
26+
if constraint != "" {
27+
args = append(args, fmt.Sprintf("-enforce=sourcegraph/%s=%s", image, constraint))
28+
} else {
29+
args = append(args, fmt.Sprintf("-update=sourcegraph/%s", image))
30+
}
2731
}
2832
args = append(args, dir)
2933
log.Println(strings.Join(args, " "))

0 commit comments

Comments
 (0)