我目前正在尝试开发一个可以使用所有必需的插件和选项创建jenkins作业的DSL脚本。 我想我几乎完成了所有部分。但是,我坚持在构建部分,我将包括"条件步骤(单个)"在Build。下。
其实我想要的是这个
但是,我得到的是这个
这是我使用的代码,
job('Sample_dev')
{
steps{
conditionalSteps{
condition{
alwaysRun()
}
}
maven{
goals('install')
}
}
}
答案 0 :(得分:0)
你在那里犯了一些错误:
尝试以下
import numpy as np
recordLen = 10 # number of int64's per record
recordSize = recordLen * 8 # size of a record in bytes
memArray = np.zeros(recordLen, dtype=np.int64) # a buffer for 1 record
# Create a binary file and open it for write+read
with open('BinaryFile.dat', 'w+b') as file:
# Writing the array into the file as record recordNo:
recordNo = 200 # the index of a target record in the file
file.seek(recordSize * recordNo)
bytes = memArray.tobytes()
file.write(bytes)
# Reading a record recordNo from file into the memArray
file.seek(recordSize * recordNo)
bytes = file.read(recordSize)
memArray = np.frombuffer(bytes, dtype=np.int64).copy()
# Note copy() added to make the memArray mutable