Azure Web 应用程序部署输出耗尽了 bitbucket 管道分钟数

Azure web app deployment output eating up bitbucket pipelines minutes

我有以下 CI/CD 设置:

将代码推送到 "origin/develop" 分支 => bitbucket 管道运行集成测试并构建源 => 推送到 azure web 应用程序 => azure web 应用程序安装节点模块并启动

问题是当管道将构建的代码推送到 azure 时,远程(即 azure web 应用程序)将部署的输出发送回管道。这看起来如下:

+ git push --force https://$AZURE_LOGIN:$AZURE_PASSWORD@hostname.scm.azurewebsites.net/hostname.git build
remote: Updating branch 'build'.        
remote: ...............        
remote: Updating submodules.        
remote: Preparing deployment for commit id '...'.        
remote: Generating deployment script.        
remote: Running deployment command...
remote: Handling node.js deployment.        
remote: Kudu sync from: '/home/site/repository' to: '/home/site/wwwroot'
remote: ...........        
remote: Processed 706 files...        
remote: Detecting node version spec...        
remote: Using appsetting WEBSITE_NODE_DEFAULT_VERSION value: 8.11        
remote: Node.js versions available on the platform are: 4.4.7, 4.5.0, 6.2.2, 6.6.0, 6.9.3, 6.10.3, 6.11.0, 8.0.0, 8.1.0, 8.2.1, 8.8.1, 8.9.4, 8.11.2, 9.4.0, 10.1.0.        
remote: Resolved to version 8.11.2        
remote: Detecting npm version spec...        
remote: Using default for node 8.11.2: 5.6.0        
remote: NPM versions available on the platform are: 2.15.8, 2.15.9, 3.9.5, 3.10.3, 3.10.10, 5.0.3, 5.4.2, 5.6.0, 6.0.1.        
remote: Resolved to version 5.6.0        
remote: Running "/opt/nodejs/8.11.2/bin/node" "/opt/npm/5.6.0/node_modules/npm/bin/npm-cli.js" install --production    

问题是这最后一步占用了相当多的时间(大约 8 分钟),这不必要地占用了我的管道分钟数...

有没有办法在我的 bitbucket 管道中忽略来自 git 的远程输出?

谢谢!

如果要构建项目,远程输出不能忽略。

如果您不想构建项目,只想将项目部署到 azure,您可以使用 部署中心然后你可以选择 Bitbucket 或其他工具来同步代码。设置好你的 Team、Repository、Branch 后,选择 Sync 进行部署。这种方式不会花费太多时间。

如果您还有其他问题,请告诉我。