當前提交
da8699ba7e
共有 2 個檔案被更改,包括 25 行新增 和 1 行删除
24
Jenkinsfile
vendored
24
Jenkinsfile
vendored
|
|
@ -1,6 +1,30 @@
|
|||
pipeline {
|
||||
agent none
|
||||
stages {
|
||||
|
||||
stage('FindHTTPCalls') {
|
||||
agent {
|
||||
docker {
|
||||
image 'maven:3.8.1-adoptopenjdk-11'
|
||||
}
|
||||
}
|
||||
environment {
|
||||
HTTPCALLS = """${sh(
|
||||
returnStdout: true,
|
||||
script: 'find ./sources -path "*.py" -exec grep -H -e "http://" {} \\;'
|
||||
)}"""
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
if (env.HTTPCALLS?.trim()) {
|
||||
currentBuild.result = 'ABORTED'
|
||||
error("Aborting the build for http calls.")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
agent {
|
||||
docker {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ argnumbers = len(sys.argv) - 1
|
|||
r =requests.get('https://xkcd.com/1906/')
|
||||
|
||||
if argnumbers == 2 :
|
||||
print("")
|
||||
# print("")
|
||||
print("The result is " + str(calc.add2(str(sys.argv[1]), str(sys.argv[2]))))
|
||||
print("")
|
||||
sys.exit(0)
|
||||
|
|
|
|||
載入中…
新增問題並參考