devops azure-devops azure-pipelines devops-services azure-devops-extensions
通过 Azure DevOps Pipelines 将 NextJS 应用程序部署到 Microsoft Azure WebApp 服务时遇到问题?
问题可能有所不同,从Error: Cannot find module '../build/output/log' on next start整个管道故障到全部管道故障。
我需要一个吗server.js?我的package.json脚本应该是什么样子?对于这个用例来说,正确的管道设置是什么样的?
解决方案很简单,您可以在下面找到它:
Azure DevOps/Pipeline IP 随机变化,因此由于防火墙规则,我无法使用 Azure SQL 数据库。
这种情况下的解决办法是什么?
azure azure-sql-database azure-devops azure-pipelines azure-pipelines-release-pipeline
我想在我的 azure Devops 管道上运行 terraform。我正在使用 MicrosoftDevLabs 市场上的 terraform 扩展版本 0.1.8\n我的任务如下所示:
\ntask: TerraformTaskV1@0\ndisplayName: 'Terraform - Init'\ninputs:\nprovider: 'azurerm'\ncommand: 'init'\ncommandOptions: '-input=false'\nbackendServiceArm: 'service-connection'\nbackendAzureRmResourceGroupName: 'Project-RG'\nbackendAzureRmStorageAccountName: 'projectsa'\nbackendAzureRmContainerName: 'tfstate'\nbackendAzureRmKey: 'terraform.tfstate'\nworkingDirectory: terraform\nRun Code Online (Sandbox Code Playgroud)\n它尝试执行的命令是
\n`/opt/hostedtoolcache/terraform/0.13.5/x64/terraform init -backend-config=storage_account_name=projectsa -backend-config=container_name=tfstate -backend-config=key=terraform.tfstate -backend-config=resource_group_name=Project-RG -backend-config=arm_subscription_id=xxxx-xxxx-xxxx -backend-config=arm_tenant_id=*** -backend-config=arm_client_id=*** -backend-config=arm_client_secret=***\xe2\x80\x99\nRun Code Online (Sandbox Code Playgroud)\n错误消息是:
\nInitializing the backend... \nError: Invalid backend configuration argument\nThe backend configuration argument "storage_account_name" given on the command line is not expected for the selected backend type. \nError: Invalid backend configuration argument \nThe backend configuration argument "container_name" given on the command …Run Code Online (Sandbox Code Playgroud) 我本质上必须运行一个 Python 脚本,该脚本将 AZ CLI 命令嵌入到脚本中,并从模块中生成为进程subprocess。为了运行这些命令,我需要登录到 AZ CLI。
我的管道中有一个 AZ CLI 任务,其中的设置为addSpnToEnvironment = true 我提供了$env:servicePrincipalId,$env:servicePrincipalKey和$env:tenantId。我的问题是,现在如何使用这些详细信息登录到 AZ CLI,以便在任务中维护上下文,并且我的 Python 脚本中的 AZ CLI 命令可以识别这一点并可以执行?
azure devops azure-devops azure-pipelines azure-service-principal
在我们的 Azure Pipeline 中,我们尝试使用以下任务在 Angular 9 应用程序中运行端到端测试...
package.json 定义了这个...
"scripts": {
...
"e2e": "npm run install-puppeteer && ng e2e"
},
Run Code Online (Sandbox Code Playgroud)
但是当代理运行上述任务时,它会因“无法打开 X 显示”错误而终止......
> npm run install-puppeteer && ng test "--watch=false" "--codeCoverage=true"
> thermo-protect-ui@0.0.0 install-puppeteer /home/vsts/work/1/s
> cd node_modules/puppeteer && npm run install
> puppeteer@5.5.0 install /home/vsts/work/1/s/node_modules/puppeteer
> node install.js
Chromium is already in /home/vsts/work/1/s/node_modules/puppeteer/.local-chromium/linux-818858; skipping download.
08 12 2020 18:54:56.858:INFO [karma-server]: Karma v4.4.1 server started at http://0.0.0.0:9876/
08 12 2020 18:54:56.863:INFO [launcher]: Launching browsers Chrome with concurrency unlimited
08 …Run Code Online (Sandbox Code Playgroud) 有没有办法在 Azure 中自定义管道调度选项,使其仅在每月的第二周运行?
我知道您可以安排它在一周中的个别日子运行,但我不知道如何按月执行此操作。
我们有一个用例,我们的代码完全托管在 Azure DevOps 中(管道、存储库等)。我们需要构建和部署“完整”构建/部署流程来部署无服务器功能。我们理想的情况是在 PR 打开和更新时有一个单一的构建/部署过程。Individual CI我们有一个构建验证策略,当 PR 接受另一个策略时,我们希望忽略该构建push,因为Build Validation策略应该取代该trigger块。
pr由于Azure Repos 无法使用触发器,有没有办法实现此目的?
存储库类型:Azure 存储库 Git
# The pipeline will fail if a branch is not either 'main' or 'something/12345-something'
trigger:
paths:
exclude:
- azure-pipelines-cleanup.yaml
- docs
- README.md
name: $(SourceBranchName).$(Rev:r)_$(Build.RequestedFor)
resources:
repositories:
- repository: pipeline
type: git
name: <Org Obscured>/infra-pipeline
ref: feature/212242-pipeline-housecleaning # this is pipeline branch ref, should be main unless testing pipeline changes
# This extends a template …Run Code Online (Sandbox Code Playgroud) azure-pipelines ×10
azure-devops ×9
azure ×4
devops ×2
azure-pipelines-release-pipeline ×1
azure-repos ×1
cron ×1
git ×1
headless ×1
next.js ×1
terraform ×1
xvfb ×1
yaml ×1