我正在使用 spring boot maven 插件在 Azure DevOps 上构建一个 java spring boot 应用程序 docker 容器。之后我想将其推送到天蓝色的容器注册表。但它失败了
本地不存在带有以下标签的镜像:***/my/container
不幸的是,容器 uri 的开头被***. 但正如您在下面的输出中看到的/usr/bin/docker images,容器已注册。我尝试遵循以下示例:https://medium.com/@TimvanBaarsen/build-your-spring-boot-project-using-azure-pipelines-in-azure-devops-3305977991d
管道步骤
steps:
- task: Maven@3
displayName: "Build Docker image"
inputs:
mavenPomFile: 'pom.xml'
goals: 'spring-boot:build-image'
publishJUnitResults: false
jdkVersionOption: '1.11'
mavenOptions: '-Xmx3072m -Dspring-boot.build-image.imageName=acr-foobar.azurecr.io/my/container'
- task: Docker@2
displayName: Push Docker image
inputs:
containerRegistry: 'acr-foobar.azurecr.io'
repository: 'my/container'
command: 'push'
tags: 'latest'
Run Code Online (Sandbox Code Playgroud)
输出 Maven 任务
[INFO] Successfully built image 'acr-***/my/container:latest'
Run Code Online (Sandbox Code Playgroud)
输出 Docker 任务
Starting: Push Docker image
==============================================================================
Task : …Run Code Online (Sandbox Code Playgroud) 如何在 d3js 线图中的 x 和 y 轴的末尾添加箭头?
我想实现这一目标:

我在渲染方法中为我的 svg 添加了一个定义,但我不知道如何将它添加到正确的位置。
svg.append("defs").append("marker")
.attr("id", "arrowhead")
.attr("refX", 6 + 3)
.attr("refY", 2)
.attr("markerWidth", 13)
.attr("markerHeight", 9)
.attr("orient", "right")
.append("path")
.attr("d", "M2,2 L2,13 L8,7 L2,2");
Run Code Online (Sandbox Code Playgroud)
你可以在http://codepen.io/anon/pen/kLtrb看到我的测试场景
有没有人有想法,是什么导致以下错误?
23.07.2015 17:48:14: SCSS: Compiling widgetmain.scss
23.07.2015 17:48:14: Looking for resource @ http://localhost.:55559/
23.07.2015 17:48:14: Looking for resource @ http://localhost.:55559/
23.07.2015 17:48:15: Looking for resource @ http://localhost.:55559/
23.07.2015 17:48:15: Looking for resource @ http://localhost.:55559/
23.07.2015 17:48:15: Looking for resource @ http://localhost.:55559/
23.07.2015 17:48:16: Looking for resource @ http://localhost.:55559/
23.07.2015 17:48:16: Unable to find resource, aborting
Run Code Online (Sandbox Code Playgroud)
它在我保存scss文件时发生.即使我完全清除文件也会发生这种情况.这就是我没有发布任何源代码的原因.端口号每次都会更改.
当我打开文件的编译视图时,它显示:
/*
Compilation Error occurred (see error list to navigate to the error location):
*/
Run Code Online (Sandbox Code Playgroud)
我已经重新安装了Web Essentials,但我没有运气.
我刚刚在Visual Studio 2017中创建了一个netstandard库,并添加了对xunit和的引用xunit.runner.visualstudio,但VS Test Explorer和Resharper 2017 EAP 3无法识别任何测试.我见过: 单元测试一个.NET Standard 1.6库但是project.json已经不见了,csproj又回来了.
我需要做什么才能运行netstandard库中包含的单元测试?
Library.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.6</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="xunit" Version="2.2.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
</ItemGroup>
</Project>
Run Code Online (Sandbox Code Playgroud)
test.cs中
namespace ClassLibrary2
{
public class Class1
{
[Fact]
public void RescharperShouldRunTest()
{
Assert.True(true);
}
}
}
Run Code Online (Sandbox Code Playgroud)
编辑
感谢答案,我取得了一些进展.
添加
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<!-- ... and ... -->
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
Run Code Online (Sandbox Code Playgroud)
确实没有影响.只有当我更改TargetFramework为netcoreapp1.1VS才发现测试并且可以运行它们.随着netstandard1.6测试浏览器仍然是空的.但我不想要一个netcore应用程序.我想要一个.NET标准库.
如何通过指定命令参数将命令绑定到MvvMCross(Xamarin.iOS)中的代码中的按钮?
// command definition
public MvxCommand SaveDealerDataCommand
{
get { return new MvxCommand<bool>(DoSaveDealerDataAction); }
}
public void DoSaveDealerDataAction(bool show)
{
//...
}
// binding
bindingset.Bind(saveButton).To(vm => vm.SaveDealerDataCommand);
Run Code Online (Sandbox Code Playgroud)
我在哪里可以指定将传递给命令的参数(true/false)?
我想要一个UITableView全屏的。但是内容的左右UITableView应该有填充。
所以我试图设置ContentInset. 但是现在单元格UITableView和 和UITableView水平滚动一样宽。
有没有办法说UITableView内容的宽度应该被水平内容插入变窄?或者我是否必须将填充添加到所有单元格和页眉/页脚视图?
我不想缩小表格视图本身,因为滚动指示器应该留在屏幕的右侧而不是中间。这里(如何以分组样式在 UITableView 中设置单元格的宽度)建议的解决方案似乎不像我想要的那样通用,因为单元格以及页眉和页脚视图必须了解填充(至少需要维护 3 个地方而不是一个)
用于在MvvmCross中创建视图模型的Construct,Init,ReloadState,Start构造模式未针对iOS实现.它仅适用于Android和Windows Phone.
有没有人使用MvvmCross编写iOS应用程序有任何策略,模式或示例来保存和恢复状态?
如何使用selenium(chrome驱动程序)抑制或自动关闭客户端证书选择对话框?
我无法使用此证书,因为它存储在芯片卡上,我必须输入PIN码.如果没有可用的卡,我们的网站使用基于凭证的登录,我想测试这个.
selenium google-chrome ui-testing client-certificates selenium-chromedriver
我正在使用hangfire 1.5.3。在我的定期工作中,我想调用一个使用自上次运行以来的时间的服务。不幸的LastExecution是,将其设置为当前时间,因为在执行作业之前已更新了作业数据。
工作
public abstract class RecurringJobBase
{
protected RecurringJobDto GetJob(string jobId)
{
using (var connection = JobStorage.Current.GetConnection())
{
return connection.GetRecurringJobs().FirstOrDefault(p => p.Id == jobId);
}
}
protected DateTime GetLastRun(string jobId)
{
var job = GetJob(jobId);
if (job != null && job.LastExecution.HasValue)
{
return job.LastExecution.Value.ToLocalTime();
}
return DateTime.Today;
}
}
public class NotifyQueryFilterSubscribersJob : RecurringJobBase
{
public const string JobId = "NotifyQueryFilterSubscribersJob";
private readonly IEntityFilterChangeNotificationService _notificationService;
public NotifyQueryFilterSubscribersJob(IEntityFilterChangeNotificationService notificationService)
{
_notificationService = notificationService;
}
public void Run()
{ …Run Code Online (Sandbox Code Playgroud) 我需要与接收NSDictionary<NSString, NSObject>Xamarin 中类型对象的函数进行接口。
首先,我不了解语法。NSDictionary<NSString, NSObject>类型对象到底是什么?我知道有NSDictionary类型,我知道如何创建一个并设置键和值,但是什么是NSDictionary<?,?>?是否应该是某种特殊的元组?
其次,如何创建这样的对象并定义键和关联的对象?
c# ×3
ios ×2
mvvmcross ×2
xamarin.ios ×2
asp.net ×1
azure-devops ×1
binding ×1
command ×1
d3.js ×1
docker ×1
generics ×1
hangfire ×1
ios7 ×1
javascript ×1
nsdictionary ×1
objective-c ×1
padding ×1
parameters ×1
resharper ×1
restore ×1
sass ×1
save ×1
selenium ×1
spring-boot ×1
state ×1
svg ×1
ui-testing ×1
uitableview ×1
xamarin ×1
xunit ×1