【发布时间】:2018-12-10 17:08:12
【问题描述】:
我有以下 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 的远程输出?
谢谢!
【问题讨论】:
-
您是否尝试在命令后添加
&以将其分离? -
我试过了,虽然输出被抑制了,但它似乎也破坏了 git push...
标签: git bitbucket continuous-deployment azure-web-app-service bitbucket-pipelines