我有一个包含以下内容的 Jenkinsfile:
node('buildprod_iamsg'){
echo "\u001B[34mSending status to dynamodb pib-deployments ...\u001B[0m"
checkout scm
def dynamo = load "aws/dynamo.groovy"
dynamo.add_metadata(substring, stripped_env, "down", lz, slackChannelName, slackToken, awsAccount, stack, ldapCommaSepList, githuburl, approver_name, time)
echo "\u001B[34mJob status sent to dynamodb pib-deployments\u001B[0m"
}
当我执行此操作时,它似乎结帐 scm 但随后不打印任何内容。之后退出。在我的 dynamo.groovy 里面我有:
public add_metadata(substring, stripped_env, statuss, lz, slackChannelName, awsAccount, stack, ldapCommaSepList, githuburl, approver_name, time){
echo "reached here"
//--projection-expression lz
def expression_attribute_values = readFile("expression_attribute_values.json").trim()
echo expression_attribute_values
parseralgo(expression_attribute_values)
}
继承人的执行结果:
Running on build_iamsg in /home/jenkins/workspace/djin_aweb_sample
[Pipeline] {
[Pipeline] echo
Sending status to dynamodb pib-deployments ...
[Pipeline] checkout
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://githubnet/djin-productivity/Deptwo.0.git/ # timeout=10
Fetching upstream changes from https://githubnet/djin-productivity/Deptwo.0.git/
> git --version # timeout=10
> git fetch --tags --progress https://githubnet/djin-productivity/Deptwo.0.git/ +refs/heads/*:refs/remotes/origin/*
> git rev-parse refs/remotes/origin/dbint^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/dbint^{commit} # timeout=10
Checking out Revision 7daa4d196eafe4698f941f01631f5ccb13947793 (refs/remotes/origin/dbint)
Commit message: "adding dynamo integration with groovy load"
> git config core.sparsecheckout # timeout=10
> git checkout -f 7daa4d196eafe4698f941f01631f5ccb13947793
[Pipeline] load
[Pipeline] { (aws/dynamo.groovy)
[Pipeline] }
[Pipeline] // load
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // timeout
[Pipeline] // wrap
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: UNSTABLE
没有打印到这里或我的 jenkinsfile 中的声明,这是发送到 dynamodb pib-deployments 的作业状态