Skip to content

Commit bb7b211

Browse files
committed
add plugin dependencies update script
Signed-off-by: perdasilva <[email protected]>
1 parent 2b44bfd commit bb7b211

File tree

5 files changed

+26
-6
lines changed

5 files changed

+26
-6
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,12 @@ e2e/operator-registry: ## Run e2e registry tests
124124
e2e/olm: ## Run e2e olm tests
125125
$(MAKE) e2e WHAT=operator-lifecycle-manager E2E_CATALOG_NS=openshift-marketplace E2E_INSTALL_NS=openshift-operator-lifecycle-manager E2E_TEST_NS=openshift-operators E2E_TIMEOUT=120m KUBECTL=oc
126126

127+
.PHONY: update-plugin-deps
128+
update-plugin-deps:
129+
./scripts/update_plugin_deps.sh
130+
127131
.PHONY: vendor
128-
vendor:
132+
vendor: update-plugin-deps
129133
go mod tidy
130134
go mod vendor
131135
go mod verify

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ require (
177177
github.com/opencontainers/go-digest v1.0.0 // indirect
178178
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
179179
github.com/openshift/client-go v0.0.0-20220525160904-9e1acff93e4a // indirect
180-
github.com/openshift/cluster-policy-controller v0.0.0-20220825134653-523e4104074f // indirect
180+
github.com/openshift/cluster-policy-controller v0.0.0-20230112143856-3f8efde27bb6 // indirect
181181
github.com/otiai10/copy v1.2.0 // indirect
182182
github.com/pbnjay/strptime v0.0.0-20140226051138-5c05b0d668c9 // indirect
183183
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -983,8 +983,8 @@ github.com/openshift/api v0.0.0-20210517065120-b325f58df679/go.mod h1:dZ4kytOo3s
983983
github.com/openshift/build-machinery-go v0.0.0-20210209125900-0da259a2c359/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE=
984984
github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0 h1:kMiuiZXH1GdfbiMwsuAQOqGaMxlo9NCUk0wT4XAdfNM=
985985
github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0/go.mod h1:uUQ4LClRO+fg5MF/P6QxjMCb1C9f7Oh4RKepftDnEJE=
986-
github.com/openshift/cluster-policy-controller v0.0.0-20220825134653-523e4104074f h1:ll0eE7rgGHsFlrI6ksr6nXL2ur8GYBe8Jj0GwNQ/1+o=
987-
github.com/openshift/cluster-policy-controller v0.0.0-20220825134653-523e4104074f/go.mod h1:r9ZZT5wjwoS2heBfYR26uJhhkGYwgmFqomu9ww0y9Qw=
986+
github.com/openshift/cluster-policy-controller v0.0.0-20230112143856-3f8efde27bb6 h1:JJ8cHS+mXYwaYjpDnmnEWNj/KPvlVhed1dFLsz3zJ3g=
987+
github.com/openshift/cluster-policy-controller v0.0.0-20230112143856-3f8efde27bb6/go.mod h1:mxj0Tg1YG9PpVJDOBLsAkjZNVvQTNu1LJkw9fSAkOE4=
988988
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
989989
github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k=
990990
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=

scripts/update_plugin_deps.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
# This script is used to keep certain dependencies regularly updated
4+
# against the same OCP branch of the current build.
5+
6+
BRANCH=$(git rev-parse --abbrev-ref HEAD)
7+
8+
echo "updating olm plugin dependencies"
9+
if [[ "$BRANCH" =~ ^master$|^release-\d+\.\d+$ ]]; then
10+
echo "attempting to update cluster-policy-controller"
11+
# needed for staging/operator-lifecycle-manager/pkg/controller/operators/olm/plugins/downstream_csv_namespace_labeler_plugin.go
12+
go get "github.com/openshift/cluster-policy-controller@${BRANCH}"
13+
else
14+
echo "skipping dependency update as branch '$BRANCH' is not recognized"
15+
fi
16+
echo "finished updating olm plugin dependencies"

vendor/modules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,8 @@ github.com/openshift/client-go/config/informers/externalversions/config
632632
github.com/openshift/client-go/config/informers/externalversions/config/v1
633633
github.com/openshift/client-go/config/informers/externalversions/internalinterfaces
634634
github.com/openshift/client-go/config/listers/config/v1
635-
# github.com/openshift/cluster-policy-controller v0.0.0-20220825134653-523e4104074f
636-
## explicit; go 1.18
635+
# github.com/openshift/cluster-policy-controller v0.0.0-20230112143856-3f8efde27bb6
636+
## explicit; go 1.19
637637
github.com/openshift/cluster-policy-controller/pkg/psalabelsyncer/nsexemptions
638638
# github.com/operator-framework/api v0.17.3 => ./staging/api
639639
## explicit; go 1.18

0 commit comments

Comments
 (0)