forked from unofficial-mirrors/znc
5 changed files with 67 additions and 16 deletions
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/python3 |
||||
|
||||
# https://scan.coverity.com/faq#frequency doesn't allow every push to be scanned. |
||||
# So this script pushes znc/znc to znc/coverity no more than once a day, with modified .travis.yml |
||||
|
||||
import datetime |
||||
import subprocess |
||||
import sys |
||||
import yaml |
||||
|
||||
subprocess.check_call(['git remote add coverity github:znc/coverity.git'], shell=True) |
||||
subprocess.check_call(['git fetch coverity'], shell=True) |
||||
commits_today = subprocess.check_output(['git log --since=today.midnight --oneline coverity/coverity_scan || true'], shell=True) |
||||
if len(commits_today) > 0: |
||||
print('There were already commits today in coverity_scan') |
||||
sys.exit() |
||||
|
||||
# Get "install:" from .travis.yml, the rest from .travis-coverity.yml |
||||
with open('.travis.yml') as f: |
||||
t = yaml.load(f) |
||||
with open('.travis-coverity.yml') as f: |
||||
c = yaml.load(f) |
||||
# Travis project of znc/coverity is not multi-os |
||||
c['install'] = ['export TRAVIS_OS_NAME=linux'] + t['install'] |
||||
|
||||
with open('.travis.yml', 'w') as f: |
||||
print(yaml.dump(c, default_flow_style=False), file=f) |
||||
|
||||
subprocess.check_call(['git checkout -b coverity_scan'], shell=True) |
||||
subprocess.check_call(['git commit .travis.yml -m"Automatic coverity scan for {}"'.format(datetime.date.today())], shell=True) |
||||
subprocess.check_call(['git push coverity coverity_scan -f'], shell=True) |
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
language: cpp |
||||
env: |
||||
global: |
||||
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created |
||||
# via the "travis encrypt" command using the project repo's public key |
||||
- secure: "ZtgnBbHMNPeSLXMT3WQu732YntCUloBr/fLF1mfSZwAoSQxfVz+RMZEwhMKhtZ9r3hTudQoAC5RTBJ7MalFBMLqsH12yK5mHSm7DujlrTG2J6LNZAz+37ZIIUzsfHoMzkCO+EGlrBhSICr7k3AaNYshL2gcaIXhf4CXX0E3Kj5H4NIuyFN8pHOYUKxnf2pwed49q3KGZq1fVnpU725jF97xv+c6G7H2aAtPOjWlV60kOQJNr7mv2fcjrx809108A7Q30ULDG5i1u5h1SN8zydh5grI/6e7BcRs0ZsV1f0H2oOg3JLNHWd1xVw0vEKyfZfr92FYTvz24YaIk2ApIeJyfu5KHrb00yYiYulZpeIyXLYswxVnQTNLGriVgUAFXa0j0MwcPg4lLQWpAQvbldYsJh9Xn+D/2qkOG0EqZbgXciCg57ZbPEhDokejmX3cjxXlJp5KwCupWLb8oSrXkRd3tnimTE9r/eV6GwFb5gmMeGEel6jsHs/AwpVds7vnaOXbfNFiQOZOK8gpmnk9K2zZxxFtrTDvJMUn/qTJ+NcUbSJX+aDj++WRZI9Rv9fdzF1m4C6tFmxyo0WdcT9ZN3pZXCWNFoMe3wt4ad72XNCBrZ8fLGmxnx0UdNURQO/C0EESakomNaIkUq3TAJXiWhFYUfu9w6Ve9mDrGtjGQkM7k=" |
||||
|
||||
addons: |
||||
coverity_scan: |
||||
project: |
||||
name: "znc/coverity" |
||||
description: "Build submitted via Travis CI" |
||||
notification_email: coverity@znc.in |
||||
build_command_prepend: "./configure --enable-perl --enable-python --enable-tcl" |
||||
build_command: "make" |
||||
branch_pattern: coverity_scan |
||||
|
||||
sudo: required |
||||
dist: trusty |
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
Host github |
||||
HostName github.com |
||||
User git |
||||
IdentityFile ~/znc-github-key |
||||
StrictHostKeyChecking no |
||||
UserKnownHostsFile /dev/null |
||||
|
Loading…
Reference in new issue