@@ -64,3 +64,110 @@ osdk-image:
64
64
$(Q ) operator-sdk build \
65
65
--go-build-args " -o build/_output/bin/openshift-pipelines-operator" \
66
66
$(IMAGE_TAG )
67
+
68
+ # #########------------------------------------------------------------##########
69
+ # #########- Operator Release------------------------------------------##########
70
+ # #########------------------------------------------------------------##########
71
+
72
+ .PHONY : opo-test-clean
73
+ opo-test-clean :
74
+ -oc delete -f deploy/
75
+ -oc delete -f deploy/crds/
76
+
77
+ .PHONY : opo-up-local
78
+ opo-test-e2e-up-local : opo-test-clean
79
+ operator-sdk test local ./test/e2e/ --up-local --namespace openshift-pipelines --go-test-flags " -v -timeout=10m" --local-operator-flags " --recursive"
80
+
81
+ .PHONY : opo-test-e2e
82
+ opo-test-e2e : opo-test-clean
83
+ operator-sdk test local ./test/e2e/ --namespace openshift-operators --go-test-flags " -v -timeout=10m" --local-operator-flags " --recursive"
84
+
85
+ # make targets for release
86
+ .PHONY : opo-clean
87
+ opo-clean :
88
+ rm -rf build/_output
89
+
90
+ .PHONY : opo-image
91
+ opo-image : opo-clean
92
+ ifndef VERSION
93
+ @echo VERSION not set
94
+ @exit 1
95
+ endif
96
+ operator-sdk build quay.io/openshift-pipeline/openshift-pipelines-operator:v${VERSION}
97
+
98
+ .PHONY : opo-image-push
99
+ opo-image-push : opo-image
100
+ ifndef VERSION
101
+ @echo VERSION not set
102
+ @exit 1
103
+ endif
104
+ docker push quay.io/openshift-pipeline/openshift-pipelines-operator:v${VERSION}
105
+
106
+ .PHONY : opo-build-push-update
107
+ opo-build-push-update : opo-image-push
108
+ ifndef VERSION
109
+ @echo VERSION not set
110
+ @exit 1
111
+ endif
112
+ sed -i 's/image:.*/image: quay.io\/openshift-pipeline\/openshift-pipelines-operator:'v${VERSION}'/' deploy/operator.yaml
113
+
114
+ .PHONY : opo-new-csv
115
+ opo-new-csv :
116
+ ifndef VERSION
117
+ @echo VERSION not set
118
+ @exit 1
119
+ endif
120
+ ifndef FROM_VERSION
121
+ @echo FROM_VERSION not set
122
+ @exit 1
123
+ endif
124
+ ifndef CHANNEL
125
+ @echo CHANNEL not set
126
+ @exit 1
127
+ endif
128
+ operator-sdk olm-catalog gen-csv \
129
+ --csv-channel dev-preview \
130
+ --csv-version ${VERSION} \
131
+ --from-version ${FROM_VERSION} \
132
+ --operator-name openshift-pipelines-operator \
133
+ --update-crds
134
+
135
+ .PHONY : opo-opr-verify
136
+ opo-opr-verify :
137
+ operator-courier verify \
138
+ --ui_validate_io \
139
+ deploy/olm-catalog/openshift-pipelines-operator
140
+
141
+ .PHONY : opo-push-quay-app
142
+ opo-push-quay-app :
143
+ ifndef VERSION
144
+ @echo VERSION not set
145
+ @exit 1
146
+ endif
147
+ ifndef QUAY_NAMESPACE
148
+ @echo QUAY_NAMESPACE not set
149
+ @exit 1
150
+ endif
151
+ ifndef TOKEN
152
+ @echo TOKEN not set
153
+ @exit 1
154
+ endif
155
+ operator-courier --verbose push \
156
+ ./deploy/olm-catalog/openshift-pipelines-operator \
157
+ ${QUAY_NAMESPACE} \
158
+ openshift-pipelines-operator \
159
+ ${VERSION} \
160
+ "${TOKEN}"
161
+
162
+ .PHONY : opo-test-scorecard
163
+ opo-test-scorecard :
164
+ ifndef VERSION
165
+ @echo VERSION not set
166
+ @exit 1
167
+ endif
168
+ operator-sdk scorecard \
169
+ --olm-deployed \
170
+ --csv-path deploy/olm-catalog/openshift-pipelines-operator/${VERSION}/openshift-pipelines-operator.v${VERSION}.clusterserviceversion.yaml \
171
+ --namespace openshift-operators \
172
+ --cr-manifest ./deploy/crds/operator_v1alpha1_config_cr.yaml \
173
+ --crds-dir .deploy/olm-catalog/openshift-pipelines-operator/${VERSION}
0 commit comments