From 692a09016a177d2de0135de0f668de23f8b04239 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 27 Jun 2022 16:05:28 +0200 Subject: [PATCH] (bug) unable to run yq in deployment scripts --- CHANGELOG.md | 2 ++ scripts/cve-2021-44228.sh | 2 +- scripts/mount-payment-schedules.sh | 2 +- scripts/mount-proof-of-identity-files.sh | 2 +- scripts/mount-webpack.sh | 2 +- scripts/nginx-packs-directive.sh | 2 +- scripts/redis-upgrade.sh | 2 +- scripts/run.sh | 2 +- scripts/set-docker-user.sh | 2 +- 9 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8596bfabe..a35cf3952 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## next deploy +- Fix a bug: unable to run yq in deployment scripts + ## v5.4.5 2022 June 27 - Feature the next event in the event page diff --git a/scripts/cve-2021-44228.sh b/scripts/cve-2021-44228.sh index 257690056..9b9a4d6da 100644 --- a/scripts/cve-2021-44228.sh +++ b/scripts/cve-2021-44228.sh @@ -3,7 +3,7 @@ # This script fixes the log4j CVE-2021-44228 vulnerability for instances using Elasticsearch 5.x yq() { - docker run --rm -i -v "${PWD}:/workdir" mikefarah/yq:4 "$@" + docker run --rm -i -v "${PWD}:/workdir" --user "$UID" mikefarah/yq:4 "$@" } config() { diff --git a/scripts/mount-payment-schedules.sh b/scripts/mount-payment-schedules.sh index 5355ca1bc..f8d0557f6 100644 --- a/scripts/mount-payment-schedules.sh +++ b/scripts/mount-payment-schedules.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash yq() { - docker run --rm -i -v "${PWD}:/workdir" mikefarah/yq:4 "$@" + docker run --rm -i -v "${PWD}:/workdir" --user "$UID" mikefarah/yq:4 "$@" } config() diff --git a/scripts/mount-proof-of-identity-files.sh b/scripts/mount-proof-of-identity-files.sh index 95231cafb..d1697e340 100644 --- a/scripts/mount-proof-of-identity-files.sh +++ b/scripts/mount-proof-of-identity-files.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash yq() { - docker run --rm -i -v "${PWD}:/workdir" mikefarah/yq:4 "$@" + docker run --rm -i -v "${PWD}:/workdir" --user "$UID" mikefarah/yq:4 "$@" } config() diff --git a/scripts/mount-webpack.sh b/scripts/mount-webpack.sh index 8cd716bba..b5c6dacba 100644 --- a/scripts/mount-webpack.sh +++ b/scripts/mount-webpack.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash yq() { - docker run --rm -i -v "${PWD}:/workdir" mikefarah/yq:4 "$@" + docker run --rm -i -v "${PWD}:/workdir" --user "$UID" mikefarah/yq:4 "$@" } config() diff --git a/scripts/nginx-packs-directive.sh b/scripts/nginx-packs-directive.sh index accce6181..ecd3e191c 100644 --- a/scripts/nginx-packs-directive.sh +++ b/scripts/nginx-packs-directive.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash yq() { - docker run --rm -i -v "${NGINX_PATH}:/workdir" mikefarah/yq:4 "$@" + docker run --rm -i -v "${NGINX_PATH}:/workdir" --user "$UID" mikefarah/yq:4 "$@" } config() diff --git a/scripts/redis-upgrade.sh b/scripts/redis-upgrade.sh index c55d3a45a..bc03f6ee1 100755 --- a/scripts/redis-upgrade.sh +++ b/scripts/redis-upgrade.sh @@ -60,7 +60,7 @@ test_docker_compose() } yq() { - docker run --rm -i -v "${FM_PATH}:/workdir" mikefarah/yq:4 "$@" + docker run --rm -i -v "${FM_PATH}:/workdir" --user "$UID" mikefarah/yq:4 "$@" } diff --git a/scripts/run.sh b/scripts/run.sh index 2d145b91c..9eb374d46 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash yq() { - docker run --rm -i -v "${PWD}:/workdir" mikefarah/yq:4 "$@" + docker run --rm -i -v "${PWD}:/workdir" --user "$UID" mikefarah/yq:4 "$@" } config() { diff --git a/scripts/set-docker-user.sh b/scripts/set-docker-user.sh index 4140b7894..de3727b55 100755 --- a/scripts/set-docker-user.sh +++ b/scripts/set-docker-user.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash yq() { - docker run --rm -i -v "${PWD}:/workdir" mikefarah/yq:4 "$@" + docker run --rm -i -v "${PWD}:/workdir" --user "$UID" mikefarah/yq:4 "$@" } config()