summaryrefslogtreecommitdiffstats
path: root/jjb/pharos
diff options
context:
space:
mode:
authorVictor Laza <vlaza@cloudbasesolutions.com>2015-05-04 10:14:18 +0300
committerVictor Laza <vlaza@cloudbasesolutions.com>2015-05-04 10:17:34 +0300
commit8b12756b2e200a830898b6e73e49969f4adca658 (patch)
tree9c22b4c8da509abe063ec962b11a95d5941b36bf /jjb/pharos
parent1e2ad344685a6f07ecc29329ecee2e2aca4fd9c1 (diff)
Extend dynamic project variable in docu-build scripts
JIRA: DOCS-26 - Extend dynamic project variable in docu-build scripts for functest, octopus, genesis & pharos Change-Id: I2bb699e7060754527fae4d7abe5b8fbf46c0a7dd Signed-off-by: Victor Laza <vlaza@cloudbasesolutions.com>
Diffstat (limited to 'jjb/pharos')
-rw-r--r--jjb/pharos/docu-build.sh (renamed from jjb/pharos/build-upload-docu.sh)7
-rw-r--r--jjb/pharos/docu-verify.sh (renamed from jjb/pharos/build-docu-verify.sh)2
-rw-r--r--jjb/pharos/pharos.yml6
3 files changed, 7 insertions, 8 deletions
diff --git a/jjb/pharos/build-upload-docu.sh b/jjb/pharos/docu-build.sh
index 50191e517..499bdbe4b 100644
--- a/jjb/pharos/build-upload-docu.sh
+++ b/jjb/pharos/docu-build.sh
@@ -2,7 +2,7 @@
set -e
set -o pipefail
-project="pharos"
+project="$(git remote -v | head -n1 | awk '{{print $2}}' | sed -e 's,.*:\(.*/\)\?,,' -e 's/\.git$//')"
export PATH=$PATH:/usr/local/bin/
git_sha1="$(git rev-parse HEAD)"
@@ -50,8 +50,8 @@ done < <(find * -type f \( -iname \*.jpg -o -iname \*.png \) -print0)
for img in "${{images[@]}}"; do
- # uploading found images
- echo "uploading $img"
+ # uploading found images
+ echo "uploading $img"
cat "$img" | gsutil cp -L gsoutput.txt - \
gs://artifacts.opnfv.org/"$project"/"$img"
gsutil setmeta -h "Content-Type:image/jpeg" \
@@ -61,4 +61,3 @@ for img in "${{images[@]}}"; do
rm -f gsoutput.txt
done
-
diff --git a/jjb/pharos/build-docu-verify.sh b/jjb/pharos/docu-verify.sh
index 50d387079..f337a7fae 100644
--- a/jjb/pharos/build-docu-verify.sh
+++ b/jjb/pharos/docu-verify.sh
@@ -2,7 +2,7 @@
set -e
set -o pipefail
-project="pharos"
+project="$(git remote -v | head -n1 | awk '{{print $2}}' | sed -e 's,.*:\(.*/\)\?,,' -e 's/\.git$//')"
export PATH=$PATH:/usr/local/bin/
git_sha1="$(git rev-parse HEAD)"
diff --git a/jjb/pharos/pharos.yml b/jjb/pharos/pharos.yml
index 8b5a01251..89f6a392a 100644
--- a/jjb/pharos/pharos.yml
+++ b/jjb/pharos/pharos.yml
@@ -72,7 +72,7 @@
builders:
- shell:
- !include-raw build-upload-docu.sh
+ !include-raw docu-build.sh
postbuilders:
- test-macro
@@ -126,7 +126,7 @@
builders:
- shell:
- !include-raw build-docu-verify.sh
+ !include-raw docu-verify.sh
- job-template:
name: 'pharos-merge'
@@ -176,5 +176,5 @@
builders:
- shell:
- !include-raw build-upload-docu.sh
+ !include-raw docu-build.sh