POSIXLY:
sed -e '
# From first line to pipeline:,just print and start next cycle
1,/^pipeline:$/b
# With all lines outside validate-merge-request block, push to hold space,
# delete them and start next cycle
# On last line, exchange hold space to pattern space, print pattern space
/validate-merge-request/,/^$/!{
H
${
x
s/\n//
p
}
d
}' <file
Note que todas as linhas após pipeline:
e não em validate-merge-request
bloco serão mantidas na memória.