我正在使用Azure App Service (Linux) App Service Build Service (CI/CD) 来部署 PHP 应用程序。
我删除了这些文件(package.json、eraseme.php),但是当站点部署到 Azure 时,这些文件并没有从 /wwwroot 中删除。
Azure 应用服务生成服务执行以下操作:
- 将存储库克隆到本地目录路径“/repository”。
- 运行 package.json 和 composer.json 以安装依赖项。
- 将“/repository”复制到“/wwwroot”。
当我列出“/repository”目录的内容时,我删除的文件不存在。该目录正确地反映了我的 GIT 存储库的“主”分支。
但是,当文件移动到“/wwwroot”时,package.json 和 eraseme.php 文件仍然存在。
有没有其他人遇到过这个问题?如果是这样,我将不胜感激您愿意提供的任何帮助。
Azure CI/CD 部署的日志:
4:45:08 PM - Updating submodules.
4:45:10 PM - Preparing deployment for commit id 'da0f786f06'.
4:45:10 PM - Repository path is /home/site/repository
4:45:10 PM - Running oryx build... (See Oryx logs below)
4:47:23 PM - Running post deployment command(s)...
4:47:24 PM - Triggering recycle (preview mode disabled).
4:47:24 PM - Deployment successful.
羚羊原木
Command: oryx build /home/site/repository -o /home/site/wwwroot --platform php --platform-version 7.3 -i /tmp/8d8ea4eb902b3c0 --log-file /tmp/build-debug.log
Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
You can report issues at https://github.com/Microsoft/Oryx/issues
Oryx Version: 0.2.20210120.1, Commit: 66c7820d7df527aaffabd2563a49ad57930999c9, ReleaseTagName: 20210120.1
Build Operation ID: |G/7ihko0yFs=.b39d9a41_
Repository Commit : da0f786f0646fc957398a50da31f19aff35f6193
Detecting platforms...
Detected following platforms:
php: 7.3.26
Using intermediate directory '/tmp/8d8ea4eb902b3c0'.
Copying files to the intermediate directory...
Done in 52 sec(s).
Source directory : /tmp/8d8ea4eb902b3c0
Destination directory: /home/site/wwwroot
PHP executable: /tmp/oryx/platforms/php/7.3.26/bin/php
Composer archive: /opt/php-composer/1.9.3/composer.phar
Running 'composer install --ignore-platform-reqs --no-interaction'...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
Package operations: 5 installs, 0 updates, 0 removals
- Installing ckdarby/silverpopphp (dev-master 3b8c5ed): Cloning 3b8c5ed525 from cache
- Installing robrichards/xmlseclibs (dev-master 0f54660): Cloning 0f5466070e from cache
- Installing robrichards/wse-php (2.0.3): Loading from cache
- Installing firebase/php-jwt (dev-master bac0422): Cloning bac0422822 from cache
- Installing salesforce-mc/fuel-sdk-php (dev-master 8018468): Cloning 8018468706 from cache
Generating autoload files
Preparing output...
Copying files to destination directory '/home/site/wwwroot'...
Done in 31 sec(s).
Removing existing manifest file
Creating a manifest file...
Manifest file created.
Done in 88 sec(s).