Local theme does not exist or error
Summary
An error is occurring in the initContainer in version 0.1.5 that is preventing custom themes from installing successfully. Please rebuild and publish the wp-ansible-docker image.
Version of the helm chart
5.4.2
Version of the images
- Init container image: 0.1.5
- Container image: 0.1.5
Steps to reproduce
- Clone repository
- Create
values-local.yamland executableinstall.shfile - Add
wpSalts: {}to file in order to workaround #54 (closed) - Run
./install -n sandboxafter creating asandboxnamespace - Inspect
init-wordpresslogs
Expected behaviour
Themes supplied in WP_THEMES_INSTALL in values-local.yaml are installed
Actual behaviour
Installation step fails with wp-ansible-docker:0.1.5.
Relevant logs and/or screen shots
This is the error Ansible logs out to the Init Container:
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'WP_THEME' is undefined\n\nThe error appears to be in '/var/local/ansible/roles/wordpress-init/tasks/main.yml': line 137, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n block:\n - debug:\n ^ here\n"}
Suggested resolution
Rebuild and push an updated wp-cli-docker image. The current HEAD does not contain the error.
Workaround
Publish and use your own image:
cd wp-cli-docker && \
docker build . --rm && \
docker tag "$(docker images -q | head -1)" dockeruser/wp-cli-docker:0.1.5.1 && \
docker push dockeruser/wp-cli-docker:0.1.5.1
And reference it by adding the following block to values-local.yaml:
initImage:
repository: dockeruser/wp-cli-docker
tag: 0.1.5.1
pullPolicy: Always
After a fresh build themes pull and install as expected.
Edited by balibebas