| |
@@ -45,14 +45,14 @@
|
| |
} else if (!params.IMAGE) {
|
| |
// Triggred by CI_MESSAGE but it's empty - CID-5291
|
| |
if (!currentBuild.getBuildCauses('hudson.model.Cause$UserIdCause')) {
|
| |
- def datagrepperdata = sh(returnStdout: true, script: "curl -k {{ c3i_datagrepper_url }}/raw?delta=300&topic=/topic/{{ c3i_messaging_greenwave_topic_virtualtopic_part }}&contains=${params.DECISION_CONTEXT_REGEX}")
|
| |
+ def datagrepperdata = sh(returnStdout: true, script: "curl -k '{{ c3i_datagrepper_url }}/raw?delta=300&topic=/topic/{{ c3i_messaging_greenwave_topic_virtualtopic_part }}&contains=${params.DECISION_CONTEXT_REGEX}'")
|
| |
def messages = readJSON text: datagrepperdata
|
| |
messages.raw_messages.any {
|
| |
def msg = it.msg
|
| |
- if ( msg?.decision_context.find(/${env.DECISION_CONTEXT_REGEX}/) &&
|
| |
+ if ( msg?.decision_context?.find(/${env.DECISION_CONTEXT_REGEX}/) &&
|
| |
msg?.subject_type == 'container-image' &&
|
| |
msg?.policies_satisfied == true &&
|
| |
- msg?.subject_identifier.find(/${env.SUBJECT_IDENTIFIER_REGEX}/)
|
| |
+ msg?.subject_identifier?.find(/${env.SUBJECT_IDENTIFIER_REGEX}/)
|
| |
){
|
| |
def digest = (msg.subject_identifier =~ /@(sha256:\w+)$/)[0][1]
|
| |
env.IMAGE = "${params.SOURCE_CONTAINER_REPO}@${digest}"
|
| |
Missing quotes in curl causes wrong request which returned messages without expected attributes.