-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot compile a component created with Docker named "component-name" #152
Comments
Root cause appears to be that we ignore the commodore/commodore/component/compile.py Lines 26 to 27 in fc8d3d7
IIRC, this behavior was implemented because we add the prefix cc @srueg |
Yes exactly. The idea was to support both variants: check-outs of components in directories with and without the A quick fix would be to forbid the |
Prevent components having the `component-` prefix in their slug. Closes #152
Prevent components having the `component-` prefix in their slug. Closes #152
When creating a component using the
docker run commodore:v0.2.0 component new component-name
command, the compilation does not work.Steps to Reproduce the Problem
Follow the steps below:
mkdir -p catalog inventory dependencies compiled
docker run -i --rm --network=host --env-file=./.env --user="$(id -u)" --volume $PWD/catalog/:/app/catalog/ --volume $PWD/dependencies/:/app/dependencies/ --volume $PWD/inventory/:/app/inventory/ --volume ~/.ssh:/app/.ssh:ro --volume ~/.gitconfig:/app/.gitconfig:ro projectsyn/commodore:v0.2.0 catalog compile c-ancient-cherry-5082 --api-url=$LIEUTENANT_URL --api-token=$LIEUTENANT_TOKEN
docker run -i --rm --user="$(id -u)" --volume ~/.ssh:/app/.ssh:ro --volume $PWD/catalog/:/app/catalog/ --volume $PWD/dependencies/:/app/dependencies/ --volume $PWD/inventory/:/app/inventory/ --volume ~/.gitconfig:/app/.gitconfig:ro projectsyn/commodore:v0.2.0 component new component-name
docker run -i --rm --user="$(id -u)" --volume ~/.ssh:/app/.ssh:ro --volume $PWD/compiled/:/app/compiled/ --volume $PWD/catalog/:/app/catalog/ --volume $PWD/dependencies/:/app/dependencies/ --volume $PWD/inventory/:/app/inventory/ --volume ~/.gitconfig:/app/.gitconfig:ro projectsyn/commodore:v0.2.0 component compile dependencies/component-name
Actual Behavior
Error: Could not find component class file: /app/dependencies/component-name/class/name.yml
Expected Behavior
I expect the component to compile normally. This error does not happen if the component name is not
component-name
.The text was updated successfully, but these errors were encountered: