# $make_opts may be empty
# make needs to wordsplit to pass options
# shellcheck disable=SC2086
-eval /opt/build-wrapper/build-wrapper-linux-x86-64 --out-dir "$build_wrap_dir" make $make_opts
+eval /opt/build-wrapper/build-wrapper-linux-x86-64 --out-dir \
+ "$build_wrap_dir" make $make_opts
echo "---> autotools-sonarqube.sh ends"
$pip install --user jsonschema
echo "Checking votes:"
-lftools infofile check-votes INFO.yaml "$GERRIT_URL" "$ref" > gerrit_comment.txt
+lftools infofile check-votes INFO.yaml "$GERRIT_URL" \
+ "$ref" > gerrit_comment.txt
exit_status="$?"
if [[ "$exit_status" -ne 0 ]]; then
exit "$exit_status"
else
echo "Vote completed submitting review"
- ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review "$GERRIT_PATCHSET_REVISION" --verified 1
+ ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review \
+ "$GERRIT_PATCHSET_REVISION" --verified 1
sleep 5
- ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review "$GERRIT_PATCHSET_REVISION" --submit
+ ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review \
+ "$GERRIT_PATCHSET_REVISION" --submit
fi
export SET_JDK_VERSION="${SET_JDK_VERSION:-openjdk11}"
echo "$SET_JDK_VERSION"
-bash <(curl -s https://raw.githubusercontent.com/lfit/releng-global-jjb/master/shell/update-java-alternatives.sh)
+GITHUB_RAW_BASE_URL="https://raw.githubusercontent.com"
+GITHUB_FILE="lfit/releng-global-jjb/master/shell/update-java-alternatives.sh"
+bash <(curl -s "${GITHUB_RAW_BASE_URL}/${GITHUB_FILE}")
# shellcheck disable=SC1091
source /tmp/java.env
cd /tmp || exit 1
+SONAR_BASE_URL="https://binaries.sonarsource.com"
+SONAR_SCANER_PATH="Distribution/sonar-scanner-cli"
+SONAR_SCANER_CLI="sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip"
wget -q -O /tmp/sonar-scan.zip \
- "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip"
+ "${SONAR_BASE_URL}/${SONAR_SCANER_PATH}/${SONAR_SCANER_CLI}"
unzip -q sonar-scan.zip
sudo mv sonar-scanner-* /opt/sonar-scanner
# $make_opts may be empty.
# shellcheck disable=SC2086
-/opt/build-wrapper/build-wrapper-linux-x86-64 --out-dir "$WORKSPACE/bw-output" \
- make $make_opts
+/opt/build-wrapper/build-wrapper-linux-x86-64 --out-dir \
+ "$WORKSPACE/bw-output" make $make_opts
/opt/sonar-scanner/bin/sonar-scanner \
-Dsonar.projectKey="${PROJECT_KEY}" \
export SET_JDK_VERSION="${SET_JDK_VERSION:-openjdk11}"
echo "$SET_JDK_VERSION"
-bash <(curl -s https://raw.githubusercontent.com/lfit/releng-global-jjb/master/shell/update-java-alternatives.sh)
+GITHUB_RAW_BASE_URL="https://raw.githubusercontent.com"
+GITHUB_FILE="lfit/releng-global-jjb/master/shell/update-java-alternatives.sh"
+bash <(curl -s "${GITHUB_RAW_BASE_URL}/${GITHUB_FILE}")
# shellcheck disable=SC1091
source /tmp/java.env
# $make_opts may be empty.
# shellcheck disable=SC2086
-/opt/build-wrapper/build-wrapper-linux-x86-64 --out-dir "$build_wrap_dir" make $make_opts
+/opt/build-wrapper/build-wrapper-linux-x86-64 --out-dir "$build_wrap_dir" \
+ make $make_opts
echo "---> cmake-sonarqube.sh ends"
fi
fi
-repo_id=$(lftools deploy nexus-stage-repo-create "$NEXUS_URL" "$staging_profile_id")
+repo_id=$(lftools deploy nexus-stage-repo-create "$NEXUS_URL" \
+ "$staging_profile_id")
mapfile -t artifacts < <(ls "$WORKSPACE"/dist)
for artifact in "${artifacts[@]}"; do
src.tar.xz
done
-lftools deploy nexus-stage-repo-close "$NEXUS_URL" "$staging_profile_id" "$repo_id"
+lftools deploy nexus-stage-repo-close "$NEXUS_URL" "$staging_profile_id" \
+ "$repo_id"
PATCH_DIR="$WORKSPACE/archives/patches"
mkdir -p "$PATCH_DIR"
-echo "$PROJECT" "$(git rev-parse --verify HEAD)" | tee -a "$PATCH_DIR/taglist.log"
+echo "$PROJECT" "$(git rev-parse --verify HEAD)" | \
+ tee -a "$PATCH_DIR/taglist.log"
echo "$repo_id" > "$WORKSPACE/archives/staging-repo.txt"