Let's use ex

2 jobs from master in 6 seconds (queued for 1 second)
Status Job ID Name Coverage
  Deploy
failed #4304
preprod
job deploy

00:06

failed #4303
preprod
job deploy

00:06

 
Name Stage Failure
failed
job deploy Deploy
$ $WPCLI core is-installed || $WPCLI core multisite-install --url="$WP_URL" --title="$WP_TITLE" --subdomains --admin_email="$WP_EMAIL"
$ echo "Generate apache2 .htaccess"
Generate apache2 .htaccess
$ $WPCLI rewrite flush --hard
Success: Rewrite rules flushed.
$ echo "Preping apache2 config"
Preping apache2 config
$ ex +%s/\$WP_URL/$WP_URL/g +wqa! apache2.conf
ERROR: Job failed: exit status 1