diff options
Diffstat (limited to 'jjb/pharos/pharos.yml')
-rw-r--r-- | jjb/pharos/pharos.yml | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/jjb/pharos/pharos.yml b/jjb/pharos/pharos.yml index c721c8d87..e1628250d 100644 --- a/jjb/pharos/pharos.yml +++ b/jjb/pharos/pharos.yml @@ -6,9 +6,12 @@ - '{name}' - '{name}-tools' + disabled: false + jobs: - '{project}-verify-basic' - 'backup-pharos-dashboard' + - 'deploy-pharos-dashboard' - job-template: name: 'backup-pharos-dashboard' @@ -28,7 +31,7 @@ mkdir -p $BACKUP_DIR echo "-- $(date +%Y%m%d) --" echo "Backing up Pharos Dashboard data..." - sudo docker run -it --rm \ + sudo docker run --rm \ -v pharos-data:/pharos-data:ro \ -v $TMP_DIR:/backup \ alpine \ @@ -36,3 +39,37 @@ 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: 'deploy-pharos-dashboard' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: 'pharos-tools' + branch: 'master' + - 'pharos-dashboard-defaults' + + scm: + - git-scm-gerrit + + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - ref-updated-event + - comment-added-contains-event: + comment-contains-value: '^redeploy$' + projects: + - project-compare-type: 'ANT' + project-pattern: 'pharos-tools' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/master' + + builders: + - shell: | + cd $WORKSPACE/dashboard + sudo docker-compose build + sudo docker-compose up -d |