From 705919aa1b6ac4134d398a1c4c97c5521cd9e62f Mon Sep 17 00:00:00 2001 From: apostolof Date: Sun, 28 Feb 2021 17:05:32 +0200 Subject: [PATCH] fix: escape dollar sign --- jenkins/Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index ce795d8..cee4c8d 100755 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -61,8 +61,8 @@ pipeline { sleep 2 sh 'docker images | grep -E "ecentrics/concordia.+tests" | tr -s \' \' | cut -d \' \' -f 3 | xargs --no-run-if-empty docker rmi -f || true' - sh "docker images | tr -s ' ' | grep -E 'ecentrics/concordia.+staging-b' | sed -r 's/(v.*-staging-b)([0-9]*)/\1\2 \2/g' | awk '{ if ($3 < ($BUILD_NUMBER - 2)) print $1\":\"$2}' | xargs --no-run-if-empty docker rmi -f || true" - sh "docker images | tr -s ' ' | grep -E 'ecentrics/concordia.+production-b' | sed -r 's/(v.*-production-b)([0-9]*)/\1\2 \2/g' | awk '{ if ($3 < ($BUILD_NUMBER - 2)) print $1\":\"$2}' | xargs --no-run-if-empty docker rmi -f || true" + sh "docker images | tr -s ' ' | grep -E 'ecentrics/concordia.+staging-b' | sed -r 's/(v.*-staging-b)([0-9]*)/\1\2 \2/g' | awk '{ if ($3 < ($BUILD_NUMBER - 2)) print \$1\":\"\$2}' | xargs --no-run-if-empty docker rmi -f || true" + sh "docker images | tr -s ' ' | grep -E 'ecentrics/concordia.+production-b' | sed -r 's/(v.*-production-b)([0-9]*)/\1\2 \2/g' | awk '{ if ($3 < ($BUILD_NUMBER - 2)) print \$1\":\"\$2}' | xargs --no-run-if-empty docker rmi -f || true" sh 'docker system prune -f' sh 'rm -rf reports'