Added publisher script and job
Added job for daily publishing logs from slaves Change-Id: Ie2733961928bb768003dd64cb30a5eb18c3b2302
This commit is contained in:
parent
9fec9f6014
commit
3e21857849
25
jenkins_job_builder/publisher.yaml
Normal file
25
jenkins_job_builder/publisher.yaml
Normal file
@ -0,0 +1,25 @@
|
||||
- job-template:
|
||||
name: 'daily-log-publisher-{lab}'
|
||||
defaults: global
|
||||
builders:
|
||||
- shell: |
|
||||
git clone https://git.openstack.org/openstack/sahara-ci-config
|
||||
./$WORKSPACE/sahara-ci-config/slave-scripts/publish-logs.sh
|
||||
triggers:
|
||||
- timed: '50 5 * * *'
|
||||
publishers:
|
||||
- workspace-cleanup:
|
||||
clean-if:
|
||||
- success: true
|
||||
- not-built: true
|
||||
- aborted: true
|
||||
node: 'lab-{lab}'
|
||||
|
||||
|
||||
- project:
|
||||
name: publisher
|
||||
lab:
|
||||
- 42
|
||||
- 43
|
||||
jobs:
|
||||
- 'daily-log-publisher-{lab}'
|
7
slave-scripts/publish-logs.sh
Executable file
7
slave-scripts/publish-logs.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
dir_name=$(date '+%d-%b-%Y')
|
||||
lab=$(echo $JOB_NAME | awk -F '-' '{ print $4 }')
|
||||
|
||||
echo "Moving logs to the https://sahara-ci-reports.mirantis.com"
|
||||
rsync -e "ssh -i /home/jenkins/.ssh/rsync_key" -avz /opt/stack/logs/ ubuntu@172.18.180.78:/var/www/html/devstack/$lab/$dir_name
|
Loading…
x
Reference in New Issue
Block a user