diff options
Diffstat (limited to 'jjb/barometer')
-rw-r--r-- | jjb/barometer/barometer-upload-artifact.sh | 34 | ||||
-rw-r--r-- | jjb/barometer/barometer.yml | 185 |
2 files changed, 124 insertions, 95 deletions
diff --git a/jjb/barometer/barometer-upload-artifact.sh b/jjb/barometer/barometer-upload-artifact.sh index 817cc5770..08c64bae7 100644 --- a/jjb/barometer/barometer-upload-artifact.sh +++ b/jjb/barometer/barometer-upload-artifact.sh @@ -2,6 +2,7 @@ set -o nounset set -o pipefail +RPM_LIST=$WORKSPACE/ci/utilities/rpms_list RPM_WORKDIR=$WORKSPACE/rpmbuild RPM_DIR=$RPM_WORKDIR/RPMS/x86_64/ cd $WORKSPACE/ @@ -9,9 +10,32 @@ cd $WORKSPACE/ # source the opnfv.properties to get ARTIFACT_VERSION source $WORKSPACE/opnfv.properties -# upload property files -gsutil cp $WORKSPACE/opnfv.properties gs://$OPNFV_ARTIFACT_URL/opnfv.properties > gsutil.properties.log 2>&1 -gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1 +# Check if all the appropriate RPMs were generated +echo "Checking if all the Barometer RPMs were created" +echo "-----------------------------------------------" +echo + +if [ -d $RPM_DIR] +then + ls $RPM_DIR > list_of_gen_pack +else + echo "Can't access folder $RPM_DIR with rpm packages" + echo "Barometer nightly build FAILED" + exit 1 +fi + +for PACKAGENAME in `cat $RPM_LIST` +do + if ! grep -q $PACKAGENAME list_of_gen_pack + then + echo "$PACKAGENAME is missing" + echo "Barometer nightly build FAILED" + exit 2 + fi +done + +#remove the file you no longer need. +rm list_of_gen_pack echo "Uploading the barometer RPMs to artifacts.opnfv.org" echo "---------------------------------------------------" @@ -25,6 +49,10 @@ if [[ $? -ne 0 ]]; then echo "Problem while uploading barometer RPMs to gs://$OPNFV_ARTIFACT_URL!" echo "Check log $WORKSPACE/gsutil.log on the appropriate build server" exit 1 +else + # upload property files only if build is successful + gsutil cp $WORKSPACE/opnfv.properties gs://$OPNFV_ARTIFACT_URL/opnfv.properties > gsutil.properties.log 2>&1 + gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1 fi gsutil -m setmeta \ diff --git a/jjb/barometer/barometer.yml b/jjb/barometer/barometer.yml index 2d3e972f8..8a5bea02e 100644 --- a/jjb/barometer/barometer.yml +++ b/jjb/barometer/barometer.yml @@ -1,3 +1,4 @@ +--- ################################################### # All the jobs except verify have been removed! # They will only be enabled on request by projects! @@ -8,19 +9,19 @@ project: '{name}' jobs: - - 'barometer-verify-{stream}' - - 'barometer-merge-{stream}' - - 'barometer-daily-{stream}' + - 'barometer-verify-{stream}' + - 'barometer-merge-{stream}' + - 'barometer-daily-{stream}' stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - danube: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false - job-template: name: 'barometer-verify-{stream}' @@ -28,44 +29,44 @@ disabled: '{obj:disabled}' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm-gerrit + - git-scm-gerrit triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - 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: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + - gerrit: + server-name: 'gerrit.opnfv.org' + 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: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' builders: - - shell: | - pwd - cd src - make clobber - make + - shell: | + pwd + cd src + make clobber + make - job-template: name: 'barometer-merge-{stream}' @@ -77,46 +78,46 @@ concurrent: true properties: - - logrotate-default - - throttle: - enabled: true - max-total: 3 - max-per-node: 2 - option: 'project' + - logrotate-default + - throttle: + enabled: true + max-total: 3 + max-per-node: 2 + option: 'project' parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' scm: - - git-scm + - git-scm triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - change-merged-event - - comment-added-contains-event: - comment-contains-value: 'remerge' - projects: - - project-compare-type: 'ANT' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**' + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: 'remerge' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' builders: - - shell: | - pwd - cd src - make clobber - make + - shell: | + pwd + cd src + make clobber + make - job-template: name: 'barometer-daily-{stream}' @@ -128,27 +129,27 @@ concurrent: false properties: - - logrotate-default + - logrotate-default parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - barometer-project-parameter: - gs-pathname: '{gs-pathname}' - - 'opnfv-build-centos-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - barometer-project-parameter: + gs-pathname: '{gs-pathname}' + - 'opnfv-build-centos-defaults' scm: - - git-scm + - git-scm triggers: - - timed: '@midnight' + - timed: '@midnight' builders: - - shell: - !include-raw-escape: ./barometer-build.sh - - shell: - !include-raw-escape: ./barometer-upload-artifact.sh + - shell: + !include-raw-escape: ./barometer-build.sh + - shell: + !include-raw-escape: ./barometer-upload-artifact.sh ######################## # parameter macros @@ -156,7 +157,7 @@ - parameter: name: barometer-project-parameter parameters: - - string: - name: GS_URL - default: '$GS_BASE{gs-pathname}' - description: "URL to Google Storage." + - string: + name: GS_URL + default: '$GS_BASE{gs-pathname}' + description: "URL to Google Storage." |