]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
build_utils: add a wrapper for tox in ceph-ansible 1234/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 23 Jan 2019 13:05:59 +0000 (14:05 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 23 Jan 2019 14:36:13 +0000 (15:36 +0100)
This is a wrapper to be able to run scripts with tox that contain
shebang with more than 127 char.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
ceph-ansible-prs/build/build
scripts/build_utils.sh

index 946e2fc2bf9c557ab5cb5cf251ef82e56387a713..8149e622673c4e88ab3f0c31809b2503b1f04b5a 100644 (file)
@@ -26,6 +26,8 @@ for scenario in $scenarios; do
 done
 popd
 
+write_exec_cmd_script
+
 # stable-3.0 doesn't have ceph-volume and therefore doesn't support LVM scenarios.
 # Rather than running a bunch of conditional steps in the pipeline to check if
 # a PR is merging into the stable-3.0 branch, we'll just pass LVM jobs.
index 04977905b4ae97baebafe6f9809b3d3f7fcb006b..80caa146eb3306f0298440eda46a4a5cb5a228ec 100644 (file)
@@ -850,6 +850,19 @@ write_collect_logs_playbook() {
 EOF
 }
 
+write_exec_cmd_script() {
+    sudo sh -c 'cat > /home/jenkins-build/bin/exec_cmd.sh << EOF
+#!/bin/bash
+
+script="$VENV"/"$1"
+
+shebang=$(head -1 "$script")
+interp=( ${shebang#\#!} )
+exec "${interp[@]}" "${@}"
+EOF'
+    sudo chmod +x /usr/local/bin/exec_cmd.sh
+}
+
 collect_ceph_logs() {
     # this is meant to be run in a testing scenario directory
     # with running vagrant vms. the ansible playbook will connect
@@ -918,4 +931,4 @@ get_nr_build_jobs() {
         n_build_jobs=$nproc
     fi
     echo $n_build_jobs
-}
+}
\ No newline at end of file