Write as XML action.

This commit is contained in:
Manuele Simi 2021-01-31 22:21:41 -05:00
parent a2b8c5c6fc
commit 4f3305496d
1 changed files with 10 additions and 8 deletions

18
Jenkinsfile vendored
View File

@ -66,8 +66,7 @@ pipeline {
echo "#Build ${PIPELINE_BUILD_NUMBER},," > $ACTION_REPORT
echo "#StartTime ${date},," >> $ACTION_REPORT
echo "Project,Repo,Result" >> $ACTION_REPORT
sh "echo -e '<actions from="${ACTION_URL}">' > $ACTION_OUTPUT"
//sh "echo -e '<actions from="${ACTION_URL}">' > $ACTION_OUTPUT"
'''
}
}
@ -81,7 +80,7 @@ pipeline {
sh "echo -e ${projects[i]},${git_root}/${projects[i]},Completed >> $ACTION_REPORT"
}
}
sh "echo -e '</actions>'>> $ACTION_OUTPUT"
// sh "echo -e '</actions>' >> $ACTION_OUTPUT"
}
}
}
@ -178,11 +177,14 @@ def exec(repo_url, repo_name) {
output = sh(script: bashWrapper, returnStdout: true)?.trim()
}
}
sh "echo -e '<action repo="${repo_url}">' --- >> $ACTION_OUTPUT"
sh "echo -e '<stdout>' >> $ACTION_OUTPUT"
sh "echo -e '${output}' >> $ACTION_OUTPUT"
sh "echo -e '</stdout>' >> $ACTION_OUTPUT"
sh "echo -e '</action>' --- >> $ACTION_OUTPUT"
def xml_action = """
<action repo="${repo_url}">
<stdout>
${output}
</stdout>
</action>
"""
sh "echo -e '${xml_action}' >> $ACTION_OUTPUT"
}