Jenkins Pipeline插件(也称为Workflow)可以使用其他Multibranch插件进行扩展,以自动构建分支和拉取请求.
运行多个配置的首选方法是什么?例如,使用Java 7和Java 8构建.这通常称为矩阵配置(由于语言版本,框架版本等多种组合)或构建变体.
我试过了:
stage步骤串行执行它们.很好,但需要的时间比必要的多.parallel步骤内执行它们,node在其中分配或不分配s.但是我无法使用stage并行内部的步骤来了解它如何可视化的已知限制.有推荐的方法吗?
public class Comparison {
public static void main(String[] args) {
String s = "prova";
String s2 = "prova";
System.out.println(s == s2);
System.out.println(s.equals(s2));
}
}
Run Code Online (Sandbox Code Playgroud)
输出:
true
true
Run Code Online (Sandbox Code Playgroud)
在我的机器上.为什么?不应该==比较对象引用相等?
根据 AWS 文档,此策略允许任何 S3 存储桶向 SNS 主题发送通知:
{
"Version":"2012-10-17",
"Id":"MyAWSPolicy",
"Statement" :[
{
"Sid":"My-statement-id",
"Effect":"Allow",
"Principal" :"*",
"Action":"sns:Publish",
"Resource":"arn:aws:sns:us-east-1:111122223333:My-Topic",
"Condition":{
"StringEquals":{
"AWS:SourceAccount":"444455556666"
}
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
我想对 SQS 队列而不是 SNS 主题执行相同的操作。该政策不起作用:
{
"Version":"2012-10-17",
"Id":"MyAWSPolicy",
"Statement" :[
{
"Sid":"My-statement-id",
"Effect":"Allow",
"Principal" :"*",
"Action":"sqs:SendMessage",
"Resource":"arn:aws:sns:us-east-1:111122223333:My-Queue",
"Condition":{
"ArnLike":{
"aws:SourceArn":"arn:aws:s3:*:111122223333:*"
}
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
这(允许世界上的每个 AWS 帐户)有效:
{
"Version":"2012-10-17",
"Id":"MyAWSPolicy",
"Statement" :[
{
"Sid":"My-statement-id",
"Effect":"Allow",
"Principal" :"*",
"Action":"sqs:SendMessage",
"Resource":"arn:aws:sns:us-east-1:111122223333:My-Queue",
"Condition":{
"ArnLike":{
"aws:SourceArn":"arn:aws:s3:*:*:*"
}
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
但是当我尝试与校长限制它时,它不再起作用:
{
"Version":"2012-10-17",
"Id":"MyAWSPolicy", …Run Code Online (Sandbox Code Playgroud) 在https://github.com/giorgiosironi/erlang-2pc/blob/master/nodes.erl#L95中,我产生了3个进程,这些进程在算法结束后终止(或者我认为:它们的函数返回).我认为start/0函数也已终止.
我开始执行这个函数:
erl -noshell -run nodes test_commit -noshell
执行该函数后,我得到了我预期的输出:
<0.30.0> - As coordinator added cohort: <0.31.0>
<0.31.0> - Will propose: yes
<0.32.0> - Will propose: yes
<0.30.0> - As coordinator added cohort: <0.32.0>
<0.30.0> - As coordinator, 1st phase trying to commit
<0.31.0> - Queried by coordinator
<0.32.0> - Queried by coordinator
<0.30.0> - As coordinator received a yes
<0.30.0> - As coordinator received a yes
<0.30.0> - As coordinator, 2nd phase
<0.31.0> - COMMIT!
<0.32.0> - COMMIT! …