David Caro has uploaded a new change for review.

Change subject: Some fixes for the standard jobs
......................................................................

Some fixes for the standard jobs

* Corrected log generation
* Added proxy config
* Fixed artifacts archiving for check jobs

Change-Id: I701f0c178a1820004c7e1e1567fc0e6a1231d4a7
Signed-off-by: David Caro <[email protected]>
---
M jobs/confs/shell-scripts/standard_build_artifacts.sh
M jobs/confs/shell-scripts/standard_check_merged.sh
M jobs/confs/shell-scripts/standard_check_patch.sh
3 files changed, 24 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/jenkins refs/changes/84/37784/1

diff --git a/jobs/confs/shell-scripts/standard_build_artifacts.sh 
b/jobs/confs/shell-scripts/standard_build_artifacts.sh
index 75e3c3b..322d989 100644
--- a/jobs/confs/shell-scripts/standard_build_artifacts.sh
+++ b/jobs/confs/shell-scripts/standard_build_artifacts.sh
@@ -50,8 +50,8 @@
 ./mock_genconfig \
     --name="$mock_conf" \
     --base="$distribution-$arch.cfg" \
+    --try-proxy \
     --option="basedir=$WORKSPACE/mock/" \
-    --option="resultdir=$WORKSPACE/exported-artifacts" \
     "${{mock_repos[@]}}" \
 > "$mock_conf.cfg"
 sudo touch /var/cache/mock/*/root_cache/cache.tar.gz &>/dev/null || :
@@ -62,6 +62,7 @@
 my_mock="/usr/bin/mock"
 my_mock+=" --configdir=$WORKSPACE/jenkins/mock_configs"
 my_mock+=" --root=$mock_conf"
+my_mock+=" --resultdir=$WORKSPACE/exported-artifacts"
 
 ## init the chroot
 $my_mock \
@@ -85,9 +86,9 @@
         --install "${{extra_packages[@]}}"
 fi
 ## from project requirements file
-build_deps_file="repoman/automation/build-artifacts.req.${{distro}}"
+build_deps_file="$project/automation/build-artifacts.req.${{distro}}"
 [[ -f "$build_deps_file" ]] \
-|| build_deps_file="repoman/automation/build-artifacts.req"
+|| build_deps_file="$project/automation/build-artifacts.req"
 if [[ -f  "$build_deps_file" ]]; then
     echo "##### Installing extra dependencies from $build_deps_file"
     packages=($(cat "$build_deps_file"))
@@ -119,6 +120,7 @@
 ./mock_genconfig \
     --name="$mock_conf" \
     --base="$distribution-$arch.cfg" \
+    --try-proxy \
     --option="basedir=$WORKSPACE/mock/" \
     --option="resultdir=$WORKSPACE/exported-artifacts" \
     --option="plugin_conf.bind_mount_enable=True" \
@@ -139,7 +141,7 @@
 set -e
 SCRIPT="/tmp/run/$project/$script"
 export HOME=/tmp/run
-cd \$HOME/repoman
+cd \$HOME/$project
 chmod +x \$SCRIPT
 \$SCRIPT
 echo -e "\n\n"
@@ -149,8 +151,9 @@
 
 mkdir -p "$WORKSPACE"/exported-artifacts
 sudo chown -R $USER:$USER "$WORKSPACE/exported-artifacts"
-if [[ -d "$WORKSPACE/$project/exported-artifacts" ]]; then
+if ls "$WORKSPACE/$project/exported-artifacts/"* &>/dev/null; then
     sudo mv "$WORKSPACE/$project/exported-artifacts/"* \
             "$WORKSPACE/exported-artifacts/"
+    sudo rmdir "$WORKSPACE/$project/exported-artifacts/"
 fi
 exit 0
diff --git a/jobs/confs/shell-scripts/standard_check_merged.sh 
b/jobs/confs/shell-scripts/standard_check_merged.sh
index cad50b4..9b40315 100644
--- a/jobs/confs/shell-scripts/standard_check_merged.sh
+++ b/jobs/confs/shell-scripts/standard_check_merged.sh
@@ -50,8 +50,8 @@
 ./mock_genconfig \
     --name="$mock_conf" \
     --base="$distribution-$arch.cfg" \
+    --try-proxy \
     --option="basedir=$WORKSPACE/mock/" \
-    --option="resultdir=$WORKSPACE/exported-artifacts" \
     "${{mock_repos[@]}}" \
 > "$mock_conf.cfg"
 sudo touch /var/cache/mock/*/root_cache/cache.tar.gz &>/dev/null || :
@@ -62,6 +62,7 @@
 my_mock="/usr/bin/mock"
 my_mock+=" --configdir=$WORKSPACE/jenkins/mock_configs"
 my_mock+=" --root=$mock_conf"
+my_mock+=" --resultdir=$WORKSPACE/exported-artifacts"
 
 ## init the chroot
 $my_mock \
@@ -85,9 +86,9 @@
         --install "${{extra_packages[@]}}"
 fi
 ## from project requirements file
-build_deps_file="repoman/automation/check-merged.req.${{distro}}"
+build_deps_file="$project/automation/check-merged.req.${{distro}}"
 [[ -f "$build_deps_file" ]] \
-|| build_deps_file="repoman/automation/check-merged.req"
+|| build_deps_file="$project/automation/check-merged.req"
 if [[ -f  "$build_deps_file" ]]; then
     echo "##### Installing extra dependencies from $build_deps_file"
     packages=($(cat "$build_deps_file"))
@@ -119,6 +120,7 @@
 ./mock_genconfig \
     --name="$mock_conf" \
     --base="$distribution-$arch.cfg" \
+    --try-proxy \
     --option="basedir=$WORKSPACE/mock/" \
     --option="resultdir=$WORKSPACE/exported-artifacts" \
     --option="plugin_conf.bind_mount_enable=True" \
@@ -139,7 +141,7 @@
 set -e
 SCRIPT="/tmp/run/$project/$script"
 export HOME=/tmp/run
-cd \$HOME/repoman
+cd \$HOME/$project
 chmod +x \$SCRIPT
 \$SCRIPT
 echo -e "\n\n"
@@ -149,8 +151,9 @@
 
 mkdir -p "$WORKSPACE"/exported-artifacts
 sudo chown -R $USER:$USER "$WORKSPACE/exported-artifacts"
-if [[ -d "$WORKSPACE/$project/exported-artifacts" ]]; then
+if ls "$WORKSPACE/$project/exported-artifacts/"* &>/dev/null; then
     sudo mv "$WORKSPACE/$project/exported-artifacts/"* \
             "$WORKSPACE/exported-artifacts/"
+    sudo rmdir "$WORKSPACE/$project/exported-artifacts/"
 fi
 exit 0
diff --git a/jobs/confs/shell-scripts/standard_check_patch.sh 
b/jobs/confs/shell-scripts/standard_check_patch.sh
index 13a9b35..cdcba1c 100644
--- a/jobs/confs/shell-scripts/standard_check_patch.sh
+++ b/jobs/confs/shell-scripts/standard_check_patch.sh
@@ -50,8 +50,8 @@
 ./mock_genconfig \
     --name="$mock_conf" \
     --base="$distribution-$arch.cfg" \
+    --try-proxy \
     --option="basedir=$WORKSPACE/mock/" \
-    --option="resultdir=$WORKSPACE/exported-artifacts" \
     "${{mock_repos[@]}}" \
 > "$mock_conf.cfg"
 sudo touch /var/cache/mock/*/root_cache/cache.tar.gz &>/dev/null || :
@@ -62,6 +62,7 @@
 my_mock="/usr/bin/mock"
 my_mock+=" --configdir=$WORKSPACE/jenkins/mock_configs"
 my_mock+=" --root=$mock_conf"
+my_mock+=" --resultdir=$WORKSPACE/exported-artifacts"
 
 ## init the chroot
 $my_mock \
@@ -85,9 +86,9 @@
         --install "${{extra_packages[@]}}"
 fi
 ## from project requirements file
-build_deps_file="repoman/automation/check-patch.req.${{distro}}"
+build_deps_file="$project/automation/check-patch.req.${{distro}}"
 [[ -f "$build_deps_file" ]] \
-|| build_deps_file="repoman/automation/check-patch.req"
+|| build_deps_file="$project/automation/check-patch.req"
 if [[ -f  "$build_deps_file" ]]; then
     echo "##### Installing extra dependencies from $build_deps_file"
     packages=($(cat "$build_deps_file"))
@@ -119,6 +120,7 @@
 ./mock_genconfig \
     --name="$mock_conf" \
     --base="$distribution-$arch.cfg" \
+    --try-proxy \
     --option="basedir=$WORKSPACE/mock/" \
     --option="resultdir=$WORKSPACE/exported-artifacts" \
     --option="plugin_conf.bind_mount_enable=True" \
@@ -139,7 +141,7 @@
 set -e
 SCRIPT="/tmp/run/$project/$script"
 export HOME=/tmp/run
-cd \$HOME/repoman
+cd \$HOME/$project
 chmod +x \$SCRIPT
 \$SCRIPT
 echo -e "\n\n"
@@ -149,8 +151,9 @@
 
 mkdir -p "$WORKSPACE"/exported-artifacts
 sudo chown -R $USER:$USER "$WORKSPACE/exported-artifacts"
-if [[ -d "$WORKSPACE/$project/exported-artifacts" ]]; then
+if ls "$WORKSPACE/$project/exported-artifacts/"* &>/dev/null; then
     sudo mv "$WORKSPACE/$project/exported-artifacts/"* \
             "$WORKSPACE/exported-artifacts/"
+    sudo rmdir "$WORKSPACE/$project/exported-artifacts/"
 fi
 exit 0


-- 
To view, visit http://gerrit.ovirt.org/37784
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I701f0c178a1820004c7e1e1567fc0e6a1231d4a7
Gerrit-PatchSet: 1
Gerrit-Project: jenkins
Gerrit-Branch: master
Gerrit-Owner: David Caro <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to