我正在尝试将提交从 GitHub 存储库推送到 ADO 存储库。GitHub 存储库中的提交是由我和其他一些作者添加的。在将提交推送到 ADO 存储库中的远程分支时,我看到以下错误:
VS403702:推送被拒绝,因为一个或多个提交包含作者电子邮件“xyz@users.noreply.github.com”,该电子邮件与策略指定的模式不匹配。
有办法解决这个问题吗?
我有两个名为private2和 的ADO 存储库public2。作为子模块的private2引用:public2
我还添加了用于构建的 yaml 文件(vsts-cicd.yml),如下所示:
\nresources:\n repositories:\n - repository: test\n type: git\n name: <ProjectName>/public2\n ref: master\n\nstages:\n\n- template: build1.yml@test\n parameters:\n repoToCheckout: test\n checkoutPath: \'$(Build.BuildNumber)\'\n\n- template: build2.yml@test\n parameters:\n repoToCheckout: test\n checkoutPath: \'$(Build.BuildNumber)\'\n \n- template: yaml/build3.yml\n\nRun Code Online (Sandbox Code Playgroud)\n在运行构建时,我看到前两个模板已成功完成。到达时- template: yaml/build3.yml失败并出现以下错误:
我缺少什么?
\n更新:
\n我按照这篇文章(https://www.timschaeps.be/post/dealing-with-error-tf401019-submodules-azure-pipelines/)来解决这个问题,但是我没有\xe2\x80\x99在项目中看到这个选项设置:\xe2\x80\x98将作业授权范围限制为引用的 Azure DevOps 存储库\xe2\x80\x99。我缺少什么?
\n\n我有一个渲染函数,如下所示:
private render(): JSX.Element {
return (
<div>
{this.props.x && this.state.y &&
<DefaultButton onClick = { this.onDeleteButtonClick } >
Delete
</DefaultButton>
}
</div>
);
}
Run Code Online (Sandbox Code Playgroud)
只有当2个条件this.props.x和this.state.y都为真,则显示该按钮.
同样的,
class TitleContainer extends React.Component {
private isPageEnabled: boolean = false;
private isSubmitter: boolean = false;
render() {
return (
<div>
{this.isPageEnabled && this.isSubmitter &&
<div>
<br />
<SubmitAppFormContainer />
</div>
}
</div>
);
}
}
Run Code Online (Sandbox Code Playgroud)
只有当2个条件this.isPageEnabled&& this.isSubmitter为真时,才显示SubmitAppFormContainer.
我该怎么写一个测试?请告诉我.谢谢!
将包“office-ui-fabric-react”从“5.124.0”更新到“6.128.0”后,我所有的测试都失败并出现以下错误:
FAIL src\***.test.tsx
? Test suite failed to run
\node_modules\office-ui-fabric-react\lib\Callout.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){export * from './components/Callout/index';
^^^^^^
SyntaxError: Unexpected token export
at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/ScriptTransformer.js:289:17)
Run Code Online (Sandbox Code Playgroud) 我在 Azure 中部署了一个函数应用程序,并在尝试“代码 + 测试”->“测试 + 运行”时,我在键下拉列表中只看到一个键 - 默认(功能键):
应用程序密钥部分如下所示:
使用此密钥运行时,我看到 401 未经授权的错误:
它不应该在下拉列表中显示更多数量的键吗?应用程序设置包含
AzureWeb作业存储
FUNCTIONS_EXTENSION_VERSION (~3)
FUNCTIONS_WORKER_RUNTIME
我是否缺少在密钥下拉列表中显示主(主机)密钥的内容?
azure azure-deployment azure-resource-manager azure-functions azure-function-app
当有多个部署槽时,是否必须在应用程序设置中设置 WEBSITE_CONTENTSHARE 值?这个值说明什么?我可以在生产槽和老化槽中为 WEBSITE_CONTENTSHARE 提供一些随机值吗?
GitHub 操作是否支持嵌套模板?例如,以下是 Azure Pipeline yaml 的示例,它调用另一个 yaml 文件:
- job: BuildFunctions
steps:
- ${{ each func in parameters.functionApps }}:
- template: yaml/build-functionapps.yml
parameters:
Run Code Online (Sandbox Code Playgroud)
是否可以在 GitHub 操作中从另一个 yaml 文件调用 yaml 文件?
我已将一个子模块添加到 ADO 存储库:
.gitmodules
[submodule "public"]
path = public
url = https://xyz.visualstudio.com/DefaultCollection/abc/_git/STW-Sol-public
Run Code Online (Sandbox Code Playgroud)
是否有 git 命令来更新 .gitmodules 以指定分支名称?
我有以下手臂模板:
resource functionApp 'Microsoft.Web/sites@2018-02-01' = {
name: name
location: location
kind: kind
properties: {
serverFarmId: resourceId('Microsoft.Web/serverfarms', servicePlanName)
clientAffinityEnabled: false
httpsOnly: true
siteConfig: {
appSettings: secretSettings
}
}
identity: {
type: 'SystemAssigned'
}
}
Run Code Online (Sandbox Code Playgroud)
我需要将平台设置为 64 位。将其更新为:
resource functionApp 'Microsoft.Web/sites@2018-02-01' = {
name: name
location: location
kind: kind
properties: {
serverFarmId: resourceId('Microsoft.Web/serverfarms', servicePlanName)
clientAffinityEnabled: false
httpsOnly: true
siteConfig: {
appSettings: secretSettings
use32BitWorkerProcess : false
}
}
identity: {
type: 'SystemAssigned'
}
}
Run Code Online (Sandbox Code Playgroud)
我看到它失败了。我缺少什么?
我试图了解部署槽的工作原理(https://learn.microsoft.com/en-us/cli/azure/webapp/deployment?view=azure-cli-latest)。
我运行以下命令来创建一个新的暂存槽:
az functionapp deployment slot create --name MyFunctionapp --resource-group MyResourceGroup --slot staging
Run Code Online (Sandbox Code Playgroud)
我看到两个部署槽处于“正在运行”状态。它是否应该一次只运行 1 个插槽?如果是这样,我该如何阻止?
我在配置中有一些应用程序设置。这个复选框表示什么?请帮助我理解。
azure-devops ×3
git ×3
azure ×2
jestjs ×2
azure-bicep ×1
azure-repos ×1
enzyme ×1
git-commit ×1
github ×1
react-native ×1
reactjs ×1
repository ×1
staging ×1
typescript ×1
yaml ×1