I have a Drupal app that is deployed with Elastic Beanstalk from a Mac machine, using the latest version of the EB CLI. The repository is an ordinary GitLab, AWS CodeCommit is not used.
Unfortunately, if I don't religiously take care of running a rm -rf vendor
before running eb deploy
, it commits four files into the archive:
1980-01-01 00:00:00 ..... 11 11 ./vendor/grasmash/yaml-expander/scenarios/symfony4/tests
1980-01-01 00:00:00 ..... 9 9 ./vendor/grasmash/yaml-expander/scenarios/symfony4/src
1980-01-01 00:00:00 ..... 11 11 ./vendor/grasmash/yaml-expander/scenarios/symfony2/tests
1980-01-01 00:00:00 ..... 9 9 ./vendor/grasmash/yaml-expander/scenarios/symfony2/src
As a result, the deploy fails, with this error message in eb-engine.log
:
2022/10/18 10:07:12.498904 [INFO] Running command /bin/sh -c /usr/bin/unzip -q -o /opt/elasticbeanstalk/deployment/app_source_bundle -d /var/app/staging/
2022/10/18 10:07:12.768789 [INFO] finished extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/ successfully
2022/10/18 10:07:12.778754 [ERROR] An error occurred during execution of command [app-deploy] - [StageApplication]. Stop running the command. Error: chown /var/app/staging/vendor/grasmash/yaml-expander/scenarios/symfony2/src: no such file or directory
The .ebignore
file is identical to .gitignore
, and has a line
/vendor
so theoretically, eb deploy
should not have added these four symlinks at all. There are no other files or folders from vendor
in the archive. The files' UID, GID and modes are identical to other files in vendor
that do not get end up deployed.
What causes this behavior?