我正在尝试在我的 Jenkins 管道代码中实现并行化,我可以在其中并行运行两个阶段。我知道这在声明性管道中是可能的,但我使用的是脚本化管道。
我试图通过做这样的事情来实现这一点:
parallel(
stage('StageA') {
echo "This is branch a"
},
stage('StageB') {
echo "This is branch b"
}
)
Run Code Online (Sandbox Code Playgroud)
当我运行它并在 Blue Ocean 中查看它时,阶段不会并行运行,而是在 StageA 之后执行 StageB。在脚本化的 jenkins 管道中是否可以有并行阶段?如果是这样,如何?
groovy continuous-integration continuous-deployment jenkins-groovy jenkins-pipeline
我正在进行java编程练习,我们必须使用drawArc方法绘制一个圆形螺旋,以便结果看起来类似于:

我一直在研究这个问题,这是我到目前为止所做的:
import java.awt.Graphics;
import javax.swing.JPanel;
import javax.swing.JFrame;
public class CircSpiral extends JPanel {
public void paintComponent(Graphics g) {
int x = 100;
int y = 120;
int width = 40;
int height = 60;
int startAngle = 20;
int arcAngle = 80;
for (int i = 0; i < 5; i++) {
g.drawArc(x, y, width, height, startAngle, arcAngle);
g.drawArc(x + 10, y + 10, width, height, startAngle + 10, arcAngle);
x = x + 5;
y = y + …Run Code Online (Sandbox Code Playgroud)