[MERGED] osmo-ci[master]: cosmetic: remove wrapper script

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Jan 22 10:37:20 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: remove wrapper script
......................................................................


cosmetic: remove wrapper script

The jenkins.sh is just a tiny wrapper around coverity_Osmocom.sh - let's
remove this unnecessary indirection and move the code directly to
jenkins.sh

Change-Id: Iead3b8f39327f1d0dd80e12a9d38563c35701993
---
D coverity/coverity_Osmocom.sh
M coverity/jenkins.sh
2 files changed, 38 insertions(+), 40 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved; Verified



diff --git a/coverity/coverity_Osmocom.sh b/coverity/coverity_Osmocom.sh
deleted file mode 100755
index 33d4fa5..0000000
--- a/coverity/coverity_Osmocom.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env bash
-
-set -e -x
-
-base_dir="$PWD"
-src_dir="$base_dir/source-Osmocom"
-cov_dir="$src_dir/cov-int"
-
-rm -rf "$src_dir"
-./prepare_source_Osmcocom.sh
-
-export PATH="$base_dir/cov-analysis-linux64-8.5.0/bin/:$PATH"
-
-rm -rf "$cov_dir"
-cov-build --dir "$cov_dir" ./build_Osmocom.sh
-
-cd "$src_dir"
-rm -f Osmocom.tgz
-tar czf Osmocom.tgz cov-int
-
-# Don't leak the token to jenkins build logs, but still log the call:
-# First compose the call to echo, then run with token inserted by 'eval'.
-set +x
-
-curl_cmd='curl \
- --form token="$token" \
- --form email=holger at freyther.de --form file=@Osmocom.tgz \
- --form version=Version --form description=AutoUpload \
- https://scan.coverity.com/builds?project=Osmocom'
-echo "$curl_cmd"
-
-token="$($base_dir/get_token.sh $base_dir/tokens.txt Osmocom)"
-if [ -z "$token" ]; then
-  echo "TOKEN IS EMPTY"
-  exit 1
-fi
-
-eval "$curl_cmd"
diff --git a/coverity/jenkins.sh b/coverity/jenkins.sh
index 9adfe99..33d4fa5 100755
--- a/coverity/jenkins.sh
+++ b/coverity/jenkins.sh
@@ -1,2 +1,38 @@
-#!/bin/sh
-./coverity_Osmocom.sh
+#!/usr/bin/env bash
+
+set -e -x
+
+base_dir="$PWD"
+src_dir="$base_dir/source-Osmocom"
+cov_dir="$src_dir/cov-int"
+
+rm -rf "$src_dir"
+./prepare_source_Osmcocom.sh
+
+export PATH="$base_dir/cov-analysis-linux64-8.5.0/bin/:$PATH"
+
+rm -rf "$cov_dir"
+cov-build --dir "$cov_dir" ./build_Osmocom.sh
+
+cd "$src_dir"
+rm -f Osmocom.tgz
+tar czf Osmocom.tgz cov-int
+
+# Don't leak the token to jenkins build logs, but still log the call:
+# First compose the call to echo, then run with token inserted by 'eval'.
+set +x
+
+curl_cmd='curl \
+ --form token="$token" \
+ --form email=holger at freyther.de --form file=@Osmocom.tgz \
+ --form version=Version --form description=AutoUpload \
+ https://scan.coverity.com/builds?project=Osmocom'
+echo "$curl_cmd"
+
+token="$($base_dir/get_token.sh $base_dir/tokens.txt Osmocom)"
+if [ -z "$token" ]; then
+  echo "TOKEN IS EMPTY"
+  exit 1
+fi
+
+eval "$curl_cmd"

-- 
To view, visit https://gerrit.osmocom.org/5977
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iead3b8f39327f1d0dd80e12a9d38563c35701993
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>



More information about the gerrit-log mailing list