Skip to content

Commit 68f64b9

Browse files
committed
Fix the review comments
1 parent efda335 commit 68f64b9

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

hack/bundle.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,17 @@ generate_bundle() {
7070

7171
# Generate the new package bundle
7272
kustomize build config/manifests | operator-sdk generate bundle -q \
73-
--version "${version}" \
74-
${opts} \
75-
--output-dir "${dir}"
73+
--version "${version}" \
74+
${opts} \
75+
--output-dir "${dir}"
7676

7777
# Ensure package name is correct for the specific bundle and that the CSV name matches the package name. Also removing
7878
# the testing annotations since these are handled automatically upstream.
7979
sed \
80-
-e "s/package.v1: cockroach-operator/package.v1: ${pkg}/g" \
81-
-e "/\s*# Annotations for testing/d" \
82-
-e "/\s*operators.operatorframework.io.test/d" \
83-
"${dir}/metadata/annotations.yaml" > "${dir}/metadata/annotations.yaml.new"
80+
-e "s/package.v1: cockroach-operator/package.v1: ${pkg}/g" \
81+
-e "/\s*# Annotations for testing/d" \
82+
-e "/\s*operators.operatorframework.io.test/d" \
83+
"${dir}/metadata/annotations.yaml" > "${dir}/metadata/annotations.yaml.new"
8484

8585
mv "${dir}/metadata/annotations.yaml.new" "${dir}/metadata/annotations.yaml"
8686

@@ -89,9 +89,9 @@ generate_bundle() {
8989

9090
# move the dockerfile into the bundle directory and make it valid
9191
sed \
92-
-e "/\s*tests\/scorecard/d" \
93-
-e "s+${dir}/++g" \
94-
bundle.Dockerfile > "${dir}/Dockerfile"
92+
-e "/\s*tests\/scorecard/d" \
93+
-e "s+${dir}/++g" \
94+
bundle.Dockerfile > "${dir}/Dockerfile"
9595

9696
rm bundle.Dockerfile
9797
rm "${dir}/manifests/cockroach-operator-webhook-service_v1_service.yaml"
@@ -108,9 +108,9 @@ adapt_csv() {
108108

109109
# replace RH_COCKROACH_OP_IMAGE_PLACEHOLDER with the proper image and CREATED_AT_PLACEHOLDER with the current time
110110
sed \
111-
-e "s+RH_COCKROACH_OP_IMAGE_PLACEHOLDER+${img}+g" \
112-
-e "s+CREATED_AT_PLACEHOLDER+"$(date +"%FT%H:%M:%SZ")"+g" \
113-
"${csv}" > "${csv}.new"
111+
-e "s+RH_COCKROACH_OP_IMAGE_PLACEHOLDER+${img}+g" \
112+
-e "s+CREATED_AT_PLACEHOLDER+"$(date +"%FT%H:%M:%SZ")"+g" \
113+
"${csv}" > "${csv}.new"
114114

115115
mv "${csv}.new" "${csv}"
116116
}
@@ -122,7 +122,7 @@ patch_marketplace_csv() {
122122

123123
local csv="${1}/cockroachdb-certified-rhmp/manifests/${2}.clusterserviceversion.yaml"
124124
sed "s+ annotations:+ annotations:\n${rhmp_annotations}+" \
125-
"${csv}" > "${csv}.new"
125+
"${csv}" > "${csv}.new"
126126
mv "${csv}.new" "${csv}"
127127
}
128128

hack/redhat.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ main() {
4343

4444
case "${1:-}" in
4545
operator)
46-
publish_operator_image
46+
publish_operator_image
4747
preflight_operator;;
4848
bundle)
4949
publish_bundle_image "${REGISTRY}/${BUNDLE_IMAGE}" "bundle/cockroachdb-certified"
@@ -65,15 +65,15 @@ main() {
6565
publish_operator_image() {
6666
echo "Publishing operator image to local repo..."
6767
APP_VERSION="v${VERSION}" \
68-
DOCKER_REGISTRY="${REGISTRY}" \
69-
DOCKER_IMAGE_REPOSITORY="${IMAGE%:*}" \
70-
bazel run --stamp --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //:push_operator_image
68+
DOCKER_REGISTRY="${REGISTRY}" \
69+
DOCKER_IMAGE_REPOSITORY="${IMAGE%:*}" \
70+
bazel run --stamp --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //:push_operator_image
7171
}
7272

7373
preflight_operator() {
7474
echo "Running preflight checks on operator image..."
7575
preflight check container "${REGISTRY}/${IMAGE}" \
76-
--docker-config "${HOME}/.docker/config.json"
76+
--docker-config "${HOME}/.docker/config.json"
7777
}
7878

7979
publish_bundle_image() {
@@ -93,17 +93,17 @@ publish_bundle_index() {
9393

9494
echo "Publishing ${index_img}..."
9595
opm index add \
96-
--container-tool docker \
97-
--bundles "${bundle_img}" \
98-
--tag "${index_img}"
96+
--container-tool docker \
97+
--bundles "${bundle_img}" \
98+
--tag "${index_img}"
9999
}
100100

101101
preflight_bundle() {
102102
local bundle_img="${1}"
103103
local index_img="${2}"
104104

105105
echo "Running preflight checks on bundle image..."
106-
echo " IMAGE: ${bundle_img}"
106+
echo "IMAGE: ${bundle_img}"
107107

108108
PFLT_INDEXIMAGE="${index_img}" preflight check operator "${bundle_img}"
109109
}

0 commit comments

Comments
 (0)