X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fpharos%2Fpharos.yml;h=e1628250d4f539705aa6ac4c5f59e664e5efcb9e;hb=da95fe6416a07fde7619002395ed0ec5a956ce02;hp=7af4f0fa680caaea2821ed3e6b403be7fb0f218f;hpb=115206f0a1a029f36e41610242648168c521d095;p=releng.git diff --git a/jjb/pharos/pharos.yml b/jjb/pharos/pharos.yml index 7af4f0fa6..e1628250d 100644 --- a/jjb/pharos/pharos.yml +++ b/jjb/pharos/pharos.yml @@ -1,8 +1,4 @@ --- -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### - project: name: pharos @@ -10,29 +6,50 @@ - '{name}' - '{name}-tools' + disabled: false + jobs: - - '{project}-verify-{stream}' + - '{project}-verify-basic' + - 'backup-pharos-dashboard' + - 'deploy-pharos-dashboard' + +- job-template: + name: 'backup-pharos-dashboard' + + disabled: '{obj:disabled}' + + parameters: + - 'pharos-dashboard-defaults' + + triggers: + - timed: '@daily' - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + builders: + - shell: | + BACKUP_DIR=$HOME/backups/ + TMP_DIR=$HOME/tmp/ + mkdir -p $BACKUP_DIR + echo "-- $(date +%Y%m%d) --" + echo "Backing up Pharos Dashboard data..." + sudo docker run --rm \ + -v pharos-data:/pharos-data:ro \ + -v $TMP_DIR:/backup \ + alpine \ + tar -czf /backup/pharos-dashboard-db-$(date +%Y%m%d).tar.gz -C /pharos-data ./ + sudo mv $TMP_DIR/pharos-dashboard-db-$(date +%Y%m%d).tar.gz $BACKUP_DIR + sudo chown $USER:$USER $BACKUP_DIR/pharos-dashboard-db-$(date +%Y%m%d).tar.gz + echo "...complete" - job-template: - name: '{project}-verify-{stream}' + name: 'deploy-pharos-dashboard' disabled: '{obj:disabled}' parameters: - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + project: 'pharos-tools' + branch: 'master' + - 'pharos-dashboard-defaults' scm: - git-scm-gerrit @@ -41,26 +58,18 @@ - 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' + - ref-updated-event - comment-added-contains-event: - comment-contains-value: 'reverify' + comment-contains-value: '^redeploy$' projects: - project-compare-type: 'ANT' - project-pattern: '{project}' + project-pattern: 'pharos-tools' branches: - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + branch-pattern: '**/master' builders: - shell: | - echo "Nothing to verify!" + cd $WORKSPACE/dashboard + sudo docker-compose build + sudo docker-compose up -d