Radish alpha
r
rad:zwTxygwuz5LDGBq255RA2CbNGrz8
Radicle CI broker
Radicle
Git
fix(ci-broker.md): drop bashism: set -o pipefail.
Merged liw opened 1 year ago

On a machine where /bin/sh it not Bash, the pipefail setting will fail.

Signed-off-by: Lars Wirzenius liw@liw.fi

1 file changed +6 -6 3da72805 ba9b4365
modified ci-broker.md
@@ -106,7 +106,7 @@ of the adapter.

~~~{#dummy.sh .file .sh}
#!/bin/sh
-
set -euo pipefail
+
set -eu
cat > /dev/null
echo '{"response":"triggered","run_id":{"id":"xyzzy"}}'
echo '{"response":"finished","result":"success"}'
@@ -450,7 +450,7 @@ then stdout has one line

~~~{#create-patch .file .sh}
#!/bin/sh
-
set -euo pipefail
+
set -eu

touch foo
git add foo
@@ -511,7 +511,7 @@ then command is successful

~~~{#adapter-with-url.sh .file .sh}
#!/bin/sh
-
set -euo pipefail
+
set -eu
echo '{"response":"triggered","run_id":{"id":"xyzzy"},"info_url":"https://ci.example.com/xyzzy"}'
echo '{"response":"finished","result":"success"}'
~~~
@@ -665,7 +665,7 @@ something to its stderr. The CI broker is meant to read and log both.

~~~{#broken-adapter.sh .file .sh}
#!/bin/sh
-
set -euo pipefail
+
set -eu
cat > /dev/null
echo '{"response":"Rivendell"}}'
echo "This is an adapter error: Mordor" 1>&2
@@ -975,7 +975,7 @@ then stdout contains "OK\n"
~~~{#count.sh .file .sh}
#!/bin/sh

-
set -euo pipefail
+
set -eu

run() {
	cibtool --db "$DB" counter count --goal "$goal"
@@ -1689,7 +1689,7 @@ when I run ./env.sh bash -x verify-upgrade run-list.txt HEAD
# verify the CI broker database has the CI runs in the list, plus one
# more, and then update the list.

-
set -euo pipefail
+
set -eu

REPO="testy"