summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
f1965ea)
E010 rule ensures consistency of "do" directive being on the same line
as it's command.
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: Id7717658728968da017107c4b496cdfbe0c5b6b0
DEPLOY_LOG="$WORKSPACE/archives/deploy-maven-file.log"
mkdir -p "$WORKSPACE/archives"
DEPLOY_LOG="$WORKSPACE/archives/deploy-maven-file.log"
mkdir -p "$WORKSPACE/archives"
-while IFS="" read -r file
-do
+while IFS="" read -r file; do
file_size=$(stat --printf="%s" "${file}")
echo "Deploy ${file##*/} with ${file_size} bytes."
lftools deploy maven-file "$MAVEN_REPO_URL" \
file_size=$(stat --printf="%s" "${file}")
echo "Deploy ${file##*/} with ${file_size} bytes."
lftools deploy maven-file "$MAVEN_REPO_URL" \
# Loop through Registry and Ports to concatentate and login to nexus
if [ "${DOCKER_REGISTRY:-none}" != 'none' ]
then
# Loop through Registry and Ports to concatentate and login to nexus
if [ "${DOCKER_REGISTRY:-none}" != 'none' ]
then
- for PORT in $REGISTRY_PORTS
- do
+ for PORT in $REGISTRY_PORTS; do
REGISTRY="${DOCKER_REGISTRY}:${PORT}"
# docker login requests an email address if nothing is passed to it
REGISTRY="${DOCKER_REGISTRY}:${PORT}"
# docker login requests an email address if nothing is passed to it
isValueInArray () {
local e match="$1"
shift
isValueInArray () {
local e match="$1"
shift
- for e; do [[ "$e" == "$match" ]] && return 0; done
+ for e; do
+ [[ "$e" == "$match" ]] && return 0
+ done
# Sleep for a little, because sometimes OpenStack has to catch up with itself
sleep 15
# Sleep for a little, because sometimes OpenStack has to catch up with itself
sleep 15
-while [ "$(openstack --os-cloud "$os_cloud" coe cluster show "$cluster_uuid" -c status -f value)" == "CREATE_IN_PROGRESS" ]
-do
+while [ "$(openstack --os-cloud "$os_cloud" coe cluster show "$cluster_uuid" -c status -f value)" == "CREATE_IN_PROGRESS" ]; do
# echo "sleeping $(date)"
sleep 2m
done
# echo "sleeping $(date)"
sleep 2m
done
mapfile -t JENKINS_FILE_LIST < <(grep -lr "^pipeline\s*{" vars src Jenkinsfile*)
exit_code=0
mapfile -t JENKINS_FILE_LIST < <(grep -lr "^pipeline\s*{" vars src Jenkinsfile*)
exit_code=0
-for JENKINS_FILE in "${JENKINS_FILE_LIST[@]}"
-do
+for JENKINS_FILE in "${JENKINS_FILE_LIST[@]}"; do
ret=$(curl --silent -X POST -H "$JENKINS_CRUMB" -F "jenkinsfile=<$JENKINS_FILE" "$JENKINS_VAL")
if [[ $ret == *"Errors"* ]];then
echo "ERROR: Linting error for $JENKINS_FILE"
ret=$(curl --silent -X POST -H "$JENKINS_CRUMB" -F "jenkinsfile=<$JENKINS_FILE" "$JENKINS_VAL")
if [[ $ret == *"Errors"* ]];then
echo "ERROR: Linting error for $JENKINS_FILE"
mkdir -p "$SAR_DIR"
cp "$SYSSTAT_PATH/"* "$_"
# convert sar data to ascii format
mkdir -p "$SAR_DIR"
cp "$SYSSTAT_PATH/"* "$_"
# convert sar data to ascii format
-while IFS="" read -r sarfilenum
-do
+while IFS="" read -r sarfilenum; do
[ -f "$sarfilenum" ] && LC_TIME=POSIX sar -A -f "$sarfilenum" > "$SAR_DIR/sar${sarfilenum//[!0-9]/}"
done < <(find "$SYSSTAT_PATH" -name "sa[0-9]*" || true)
[ -f "$sarfilenum" ] && LC_TIME=POSIX sar -A -f "$sarfilenum" > "$SAR_DIR/sar${sarfilenum//[!0-9]/}"
done < <(find "$SYSSTAT_PATH" -name "sa[0-9]*" || true)