Skip to content

Commit 80843e0

Browse files
committed
annotate
1 parent 0fe8b3a commit 80843e0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,21 @@ HELM_CHART_ARTIFACT := target/helm/${OPERATOR_NAME}-${VERSION}.tgz
2323

2424
SHELL=/usr/bin/env bash -euo pipefail
2525

26+
# used in build.yml
2627
render-readme:
2728
scripts/render_readme.sh
2829

30+
# run by developer when changing doc templates like getting_started
2931
render-docs:
3032
scripts/docs_templating.sh
3133

3234
## Docker related targets
35+
# called by the "docker" target
3336
docker-build:
3437
docker build --force-rm --build-arg VERSION=${VERSION} -t "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}:${VERSION}-${ARCH}" -f docker/Dockerfile .
3538

39+
# called by the "docker" target
40+
# called by build.yml
3641
docker-publish:
3742
# Push to Harbor
3843
# We need to use "value" here to prevent the variable from being recursively expanded by make (username contains a dollar sign, since it's a Harbor bot)
@@ -61,9 +66,11 @@ docker-publish:
6166
cosign attest -y --predicate sbom.merged.json --type cyclonedx "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}@$$REPO_DIGEST_OF_IMAGE"
6267

6368
# This assumes "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}:${VERSION}-amd64 and "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}:${VERSION}-arm64 are built and pushed
69+
# called by build.yml - TODO use the reusable action
6470
docker-manifest-list-build:
6571
docker manifest create "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}:${VERSION}" --amend "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}:${VERSION}-amd64" --amend "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}:${VERSION}-arm64"
6672

73+
# called by build.yml - TODO use the reusable action
6774
docker-manifest-list-publish:
6875
# Push to Harbor
6976
# We need to use "value" here to prevent the variable from being recursively expanded by make (username contains a dollar sign, since it's a Harbor bot)
@@ -75,11 +82,17 @@ docker-manifest-list-publish:
7582
cosign sign -y "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}:${VERSION}@$$DIGEST_HARBOR"
7683

7784
# TODO remove if not used/needed
85+
# Remove this, covered by CI
7886
docker: docker-build docker-publish
7987

88+
# used in build.yml
89+
# Not needed
8090
print-docker-tag:
8191
@echo "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_IMAGES}/${OPERATOR_NAME}:${VERSION}"
8292

93+
# used by publish
94+
# used in build.yml
95+
# Not needed
8396
helm-publish:
8497
# Push to Harbor
8598
# We need to use "value" here to prevent the variable from being recursively expanded by make (username contains a dollar sign, since it's a Harbor bot)
@@ -97,6 +110,7 @@ helm-publish:
97110
# Uses the keyless signing flow with Github Actions as identity provider\
98111
cosign sign -y "${OCI_REGISTRY_HOSTNAME}/${OCI_REGISTRY_PROJECT_CHARTS}/${HELM_CHART_NAME}@$$REPO_DIGEST_OF_ARTIFACT"
99112

113+
# TODO: make a reusable action for this
100114
helm-package:
101115
mkdir -p target/helm && helm package --destination target/helm deploy/helm/${OPERATOR_NAME}
102116

@@ -117,6 +131,7 @@ config:
117131
cp -r deploy/config-spec/* "deploy/helm/${OPERATOR_NAME}/configs";\
118132
fi
119133

134+
# Maxi uses this occasionally
120135
crds:
121136
mkdir -p deploy/helm/"${OPERATOR_NAME}"/crds
122137
cargo run --bin stackable-"${OPERATOR_NAME}" -- crd | yq eval '.metadata.annotations["helm.sh/resource-policy"]="keep"' - > "deploy/helm/${OPERATOR_NAME}/crds/crds.yaml"

0 commit comments

Comments
 (0)