12 - '{project}-verify-basic'
13 - 'backup-pharos-dashboard'
14 - 'deploy-pharos-dashboard':
18 name: 'backup-pharos-dashboard'
20 disabled: '{obj:disabled}'
23 - 'pharos-dashboard-defaults'
30 BACKUP_DIR=$HOME/backups/
33 echo "-- $(date +%Y%m%d) --"
34 echo "Backing up Pharos Dashboard data..."
35 sudo docker run --rm \
36 -v pharos-data:/pharos-data:ro \
39 tar -czf /backup/pharos-dashboard-db-$(date +%Y%m%d).tar.gz -C /pharos-data ./
40 sudo mv $TMP_DIR/pharos-dashboard-db-$(date +%Y%m%d).tar.gz $BACKUP_DIR
41 sudo chown $USER:$USER $BACKUP_DIR/pharos-dashboard-db-$(date +%Y%m%d).tar.gz
45 name: 'deploy-pharos-dashboard'
47 disabled: '{obj:disabled}'
51 project: 'pharos-tools'
53 - 'pharos-dashboard-defaults'
57 choosing-strategy: 'gerrit'
58 refspec: '$GERRIT_REFSPEC'
62 credentials-id: '$SSH_CREDENTIAL_ID'
69 server-name: 'gerrit.opnfv.org'
72 - comment-added-contains-event:
73 comment-contains-value: '^redeploy$'
75 - project-compare-type: 'ANT'
76 project-pattern: 'pharos-tools'
78 - branch-compare-type: 'ANT'
79 branch-pattern: '**/master'
83 cp $HOME/config.env $WORKSPACE/dashboard
84 cp $HOME/rsa.pub $WORKSPACE/dashboard
85 cp $HOME/rsa.pem $WORKSPACE/dashboard
86 cd $WORKSPACE/dashboard
87 sudo docker-compose build
88 sudo docker-compose up -d