Add basic Makefiles for keycloak - #504
Conversation
WalkthroughThe changes introduce new Makefiles for the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Makefile
participant CommonScripts
User->>Makefile: Run Makefile
Makefile->>CommonScripts: Include common-envs.mk
Makefile->>CommonScripts: Include package.mk
Makefile->>User: Set NAME and NAMESPACE
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
76a5dfc to
47518af
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
packages/system/keycloak-operator/Makefile (2)
1-2: Consider adding comments to document the environment variablesWhile the variable names are self-explanatory, it would be helpful to add comments explaining their purpose and impact on the build process, especially since these variables are used across multiple packages.
+# Name of the operator package export NAME=keycloak-operator +# Namespace for all keycloak-related deployments export NAMESPACE=cozy-keycloak
Line range hint
6-11: Consider enhancing the update target with error handling and version pinningThe current implementation could benefit from some improvements:
- Add error handling for helm commands
- Consider pinning the chart version for reproducible builds
- Add a
.PHONYdeclaration for the target+.PHONY: update + update: - rm -rf charts - helm repo add epamedp https://epam.github.io/edp-helm-charts/stable - helm repo update epamedp - helm pull epamedp/keycloak-operator --untar --untardir charts + rm -rf charts || exit 1 + helm repo add epamedp https://epam.github.io/edp-helm-charts/stable || exit 1 + helm repo update epamedp || exit 1 + # Consider adding a VERSION variable for pinning + helm pull epamedp/keycloak-operator --version $(VERSION) --untar --untardir charts || exit 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
packages/system/keycloak-configure/Makefile(1 hunks)packages/system/keycloak-operator/Makefile(1 hunks)packages/system/keycloak/Makefile(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- packages/system/keycloak/Makefile
- packages/system/keycloak-configure/Makefile
🔇 Additional comments (1)
packages/system/keycloak-operator/Makefile (1)
4-4: Verify the common script paths and contents
Let's ensure the referenced scripts exist and are accessible.
✅ Verification successful
Common script paths are valid and widely used across the repository
The verification confirms that both common-envs.mk and package.mk exist at the root scripts/ directory and are actively included by numerous Makefiles across the repository. The relative path ../../../scripts/common-envs.mk is correct for packages in the current directory structure.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the existence and contents of common scripts
# Check if the scripts exist
for script in common-envs.mk package.mk; do
echo "Checking scripts/$script..."
if [ -f "scripts/$script" ]; then
echo "Content of scripts/$script:"
cat "scripts/$script"
else
echo "Warning: scripts/$script not found"
fi
done
# Look for similar include patterns in other Makefiles
echo "Checking for similar includes in other Makefiles..."
rg "include.*scripts/(common-envs|package)\.mk" --type make
Length of output: 9096
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced new Makefiles for `keycloak`, `keycloak-configure`, and `keycloak-operator` packages, establishing environment variables for deployment. - Each Makefile includes common scripts to streamline build and environment settings. - **Bug Fixes** - No specific bug fixes were mentioned. - **Documentation** - No updates to documentation were noted. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
keycloak,keycloak-configure, andkeycloak-operatorpackages, establishing environment variables for deployment.Bug Fixes
Documentation