From: Fatih Degirmenci Date: Thu, 30 Apr 2015 12:24:59 +0000 (+0000) Subject: Merge "add documents build scripts and amend jjb file for parser project JIRA: PARSER-2" X-Git-Tag: arno.2015.1.0~79 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=8f0951b049a196db7a4fa3b030d280c3d94f1a5d;hp=f4992d6b964758704f13827eba8be981f3024f12;p=releng.git Merge "add documents build scripts and amend jjb file for parser project JIRA: PARSER-2" --- diff --git a/jjb/functest/build-docu-verify.sh b/jjb/functest/build-docu-verify.sh index e8f34a784..c692226dd 100644 --- a/jjb/functest/build-docu-verify.sh +++ b/jjb/functest/build-docu-verify.sh @@ -1,4 +1,7 @@ #!/bin/bash +set -e +set -o pipefail + project="functest" export PATH=$PATH:/usr/local/bin/ diff --git a/jjb/functest/build-upload-docu.sh b/jjb/functest/build-upload-docu.sh index bd5abdbf2..ee45d68a3 100644 --- a/jjb/functest/build-upload-docu.sh +++ b/jjb/functest/build-upload-docu.sh @@ -1,4 +1,7 @@ #!/bin/bash +set -e +set -o pipefail + project="functest" export PATH=$PATH:/usr/local/bin/ @@ -40,3 +43,22 @@ for file in "${{files[@]}}"; do done +images=() +while read -r -d ''; do + images+=("$REPLY") +done < <(find * -type f \( -iname \*.jpg -o -iname \*.png \) -print0) + +for img in "${{images[@]}}"; do + + # 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" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + gs://artifacts.opnfv.org/"$project"/"$img" + cat gsoutput.txt + rm -f gsoutput.txt + +done + diff --git a/jjb/functest/functest.yml b/jjb/functest/functest.yml index c5650ac67..a4466f8a5 100644 --- a/jjb/functest/functest.yml +++ b/jjb/functest/functest.yml @@ -42,7 +42,7 @@ project-type: freestyle - node: orange-build + node: ericsson-test logrotate: daysToKeep: 30 diff --git a/jjb/genesis/build-docu-verify.sh b/jjb/genesis/build-docu-verify.sh new file mode 100644 index 000000000..06b374e16 --- /dev/null +++ b/jjb/genesis/build-docu-verify.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -e +set -o pipefail + +project="genesis" +export PATH=$PATH:/usr/local/bin/ + +git_sha1="$(git rev-parse HEAD)" +docu_build_date="$(date)" + +files=() +while read -r -d ''; do + files+=("$REPLY") +done < <(find . -type f -iname '*.rst' -print0) + +for file in "${{files[@]}}"; do + + file_cut="${{file%.*}}" + gs_cp_folder="$(echo "$file"| cut -d "/" -f2,3)" + + # sed part + sed -i "s/_sha1_/$git_sha1/g" $file + sed -i "s/_date_/$docu_build_date/g" $file + + # rst2html part + echo "rst2html $file" + rst2html $file > $file_cut".html" + + echo "rst2pdf $file" + rst2pdf $file -o $file_cut".pdf" + +done + diff --git a/jjb/genesis/build-docu.sh b/jjb/genesis/build-docu.sh deleted file mode 100644 index b3869fcf7..000000000 --- a/jjb/genesis/build-docu.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -project="genesis" -export PATH=$PATH:/usr/local/bin/ - -files=() -while read -r -d ''; do - files+=("$REPLY") -done < <(find . -type f -iname '*.rst' -print0) - -for file in "${{files[@]}}"; do - - file_cut="${{file%.*}}" - gs_cp_folder="$(echo "$file"| cut -d "/" -f2,3)" - - html_file=$file_cut".html" - - echo "rst2html $file" - rst2html $file | gsutil cp -L gsoutput.txt - \ - gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$html_file") - gsutil setmeta -h "Content-Type:text/html" \ - -h "Cache-Control:private, max-age=0, no-transform" \ - gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$html_file") - cat gsoutput.txt - rm -f gsoutput.txt - - pdf_file="$file_cut"".pdf" - - echo "rst2pdf $file" - rst2pdf "$file" -o - | gsutil cp -L gsoutput.txt - \ - gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$pdf_file") - gsutil setmeta -h "Content-Type:application/pdf" \ - -h "Cache-Control:private, max-age=0, no-transform" \ - gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$pdf_file") - cat gsoutput.txt - rm -f gsoutput.txt - -done - diff --git a/jjb/genesis/build-upload-docu.sh b/jjb/genesis/build-upload-docu.sh new file mode 100644 index 000000000..2a6bbf725 --- /dev/null +++ b/jjb/genesis/build-upload-docu.sh @@ -0,0 +1,67 @@ +#!/bin/bash +set -e +set -o pipefail + +project="genesis" +export PATH=$PATH:/usr/local/bin/ + +git_sha1="$(git rev-parse HEAD)" +docu_build_date="$(date)" + +files=() +while read -r -d ''; do + files+=("$REPLY") +done < <(find . -type f -iname '*.rst' -print0) + +for file in "${{files[@]}}"; do + + file_cut="${{file%.*}}" + gs_cp_folder="$(echo "$file"| cut -d "/" -f2,3)" + + # sed part + sed -i "s/_sha1_/$git_sha1/g" $file + sed -i "s/_date_/$docu_build_date/g" $file + + # rst2html part + html_file=$file_cut".html" + echo "rst2html $file" + rst2html $file | gsutil cp -L gsoutput.txt - \ + gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$html_file") + gsutil setmeta -h "Content-Type:text/html" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$html_file") + cat gsoutput.txt + rm -f gsoutput.txt + + # rst2pdf part + pdf_file="$file_cut"".pdf" + echo "rst2pdf $file" + rst2pdf "$file" -o - | gsutil cp -L gsoutput.txt - \ + gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$pdf_file") + gsutil setmeta -h "Content-Type:application/pdf" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder"/$(basename "$pdf_file") + cat gsoutput.txt + rm -f gsoutput.txt + +done + +images=() +while read -r -d ''; do + images+=("$REPLY") +done < <(find * -type f \( -iname \*.jpg -o -iname \*.png \) -print0) + +for img in "${{images[@]}}"; do + + # 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" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + gs://artifacts.opnfv.org/"$project"/"$img" + cat gsoutput.txt + rm -f gsoutput.txt + +done + diff --git a/jjb/genesis/genesis-docs.yml b/jjb/genesis/genesis-docs.yml index 14ef95ba9..21c16f7ad 100644 --- a/jjb/genesis/genesis-docs.yml +++ b/jjb/genesis/genesis-docs.yml @@ -4,7 +4,8 @@ name: genesis-docs jobs: - - 'genesis-build-docs' + - 'genesis-merge-docs' + - 'genesis-verify-docs' # stream: branch with - in place of / (eg. stable-helium) # branch: branch (eg. stable/helium) @@ -18,7 +19,9 @@ # job templates ######################## - job-template: - name: 'genesis-build-docs' + name: 'genesis-merge-docs' + + node: master project-type: freestyle @@ -59,5 +62,58 @@ builders: - shell: - !include-raw build-docu.sh + !include-raw build-upload-docu.sh + +- job-template: + name: 'genesis-verify-docs' + + node: master + + project-type: freestyle + + logrotate: + daysToKeep: 30 + numToKeep: 40 + artifactDaysToKeep: -1 + artifactNumToKeep: 5 + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: 'master' + + scm: + - gerrit-trigger-scm: + credentials-id: '{ssh-credentials}' + refspec: '' + choosing-strategy: 'default' + + wrappers: + - ssh-agent-credentials: + user: '{ssh-credentials}' + + triggers: + - gerrit: + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'false' + - draft-published-event + - comment-added-contains-event: + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' + + projects: + - project-compare-type: 'ANT' + project-pattern: 'genesis' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/master' + + builders: + - shell: + !include-raw build-docu-verify.sh diff --git a/jjb/octopus/build-docu-verify.sh b/jjb/octopus/build-docu-verify.sh index 01338efe4..9c288fa12 100644 --- a/jjb/octopus/build-docu-verify.sh +++ b/jjb/octopus/build-docu-verify.sh @@ -1,4 +1,7 @@ #!/bin/bash +set -e +set -o pipefail + project="octopus" export PATH=$PATH:/usr/local/bin/ diff --git a/jjb/octopus/build-upload-docu.sh b/jjb/octopus/build-upload-docu.sh index 81f875dcf..fdd1463d7 100644 --- a/jjb/octopus/build-upload-docu.sh +++ b/jjb/octopus/build-upload-docu.sh @@ -1,4 +1,7 @@ #!/bin/bash +set -e +set -o pipefail + project="octopus" export PATH=$PATH:/usr/local/bin/ @@ -40,3 +43,22 @@ for file in "${{files[@]}}"; do done +images=() +while read -r -d ''; do + images+=("$REPLY") +done < <(find * -type f \( -iname \*.jpg -o -iname \*.png \) -print0) + +for img in "${{images[@]}}"; do + + # 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" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + gs://artifacts.opnfv.org/"$project"/"$img" + cat gsoutput.txt + rm -f gsoutput.txt + +done + diff --git a/jjb/opnfvdocs/build-upload-docu.sh b/jjb/opnfvdocs/docu-build.sh similarity index 60% rename from jjb/opnfvdocs/build-upload-docu.sh rename to jjb/opnfvdocs/docu-build.sh index b7437265d..499bdbe4b 100644 --- a/jjb/opnfvdocs/build-upload-docu.sh +++ b/jjb/opnfvdocs/docu-build.sh @@ -1,5 +1,8 @@ #!/bin/bash -project="opnfvdocs" +set -e +set -o pipefail + +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)" @@ -40,3 +43,21 @@ for file in "${{files[@]}}"; do done +images=() +while read -r -d ''; do + images+=("$REPLY") +done < <(find * -type f \( -iname \*.jpg -o -iname \*.png \) -print0) + +for img in "${{images[@]}}"; do + + # 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" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + gs://artifacts.opnfv.org/"$project"/"$img" + cat gsoutput.txt + rm -f gsoutput.txt + +done diff --git a/jjb/opnfvdocs/build-docu-verify.sh b/jjb/opnfvdocs/docu-verify.sh similarity index 80% rename from jjb/opnfvdocs/build-docu-verify.sh rename to jjb/opnfvdocs/docu-verify.sh index 061e46d22..f337a7fae 100644 --- a/jjb/opnfvdocs/build-docu-verify.sh +++ b/jjb/opnfvdocs/docu-verify.sh @@ -1,5 +1,8 @@ #!/bin/bash -project="opnfvdocs" +set -e +set -o pipefail + +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/opnfvdocs/opnfvdocs.yml b/jjb/opnfvdocs/opnfvdocs.yml index 37310a79c..39e33eb54 100644 --- a/jjb/opnfvdocs/opnfvdocs.yml +++ b/jjb/opnfvdocs/opnfvdocs.yml @@ -51,7 +51,7 @@ builders: - shell: - !include-raw build-upload-docu.sh + !include-raw docu-build.sh - job-template: name: 'opnfvdocs-verify' @@ -102,7 +102,7 @@ builders: - shell: - !include-raw build-docu-verify.sh + !include-raw docu-verify.sh - job-template: name: 'opnfvdocs-merge' @@ -152,5 +152,5 @@ builders: - shell: - !include-raw build-upload-docu.sh + !include-raw docu-build.sh diff --git a/jjb/pharos/build-docu-verify.sh b/jjb/pharos/build-docu-verify.sh index 46862d913..50d387079 100644 --- a/jjb/pharos/build-docu-verify.sh +++ b/jjb/pharos/build-docu-verify.sh @@ -1,4 +1,7 @@ #!/bin/bash +set -e +set -o pipefail + project="pharos" export PATH=$PATH:/usr/local/bin/ diff --git a/jjb/pharos/build-upload-docu.sh b/jjb/pharos/build-upload-docu.sh index caf102119..50191e517 100644 --- a/jjb/pharos/build-upload-docu.sh +++ b/jjb/pharos/build-upload-docu.sh @@ -1,4 +1,7 @@ #!/bin/bash +set -e +set -o pipefail + project="pharos" export PATH=$PATH:/usr/local/bin/ @@ -40,3 +43,22 @@ for file in "${{files[@]}}"; do done +images=() +while read -r -d ''; do + images+=("$REPLY") +done < <(find * -type f \( -iname \*.jpg -o -iname \*.png \) -print0) + +for img in "${{images[@]}}"; do + + # 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" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + gs://artifacts.opnfv.org/"$project"/"$img" + cat gsoutput.txt + rm -f gsoutput.txt + +done + diff --git a/test.html b/test.html deleted file mode 100644 index 7fe7ce438..000000000 --- a/test.html +++ /dev/null @@ -1,362 +0,0 @@ - - - - -OpenStack - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
- - -
- -
- Jump to: navigation, - search -
- - - -
-

- Main Page -

- -
- -
- -
-

Openstack-vertical-small.png -

-
-

The OpenStack Mission: to produce the ubiquitous Open Source Cloud Computing platform that will meet the needs of public and private clouds regardless of size, by being simple to implement and massively scalable. -

OpenStack is open source, openly designed, openly developed by an open community. -

-
- -
-

Getting started

- -
-

Contribute to OpenStack

- -
-

Community

- -
-
- -
-

Openstack-compute-icon.png -

-
-

OpenStack Project Teams are the building blocks to achieve OpenStack's mission. One can think of Project Teams as teams of people using tools (code repository, bug tracker, etc) and coordinated processes to produce a number of deliverables, in order to achieve a clearly stated objective. -

-
- - - -
-

Main services

- -
-

Supporting services

- -
-

Horizontal teams

- -
-

See also the list of other working groups. -

-
-


-

-
- - - - -
- - - - - - - -
- - -
- -
- - - - - - - - - - - - - - - - - -