Skip to content

Commit

Permalink
Switch from Travis to Cirrus.
Browse files Browse the repository at this point in the history
  • Loading branch information
macdice committed Dec 31, 2020
1 parent ec98fc4 commit a62aa6d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 deletions.
11 changes: 8 additions & 3 deletions cfbot.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env python

import cfbot_appveyor
import cfbot_cirrus
import cfbot_travis

import cfbot_commitfest
import cfbot_commitfest_rpc
import cfbot_config
import cfbot_patch
import cfbot_travis
import cfbot_util
import cfbot_web
import fcntl
Expand All @@ -29,9 +31,12 @@ def run():
commitfest_id = cfbot_commitfest_rpc.get_current_commitfest_id()

# pull in any build results that we are waiting for
if "appveyor" in cfbot_config.CI_PROVIDERS:
if "appveyor" in cfbot_config.CI_MODULES:
cfbot_appveyor.pull_build_results(conn)
if "travis" in cfbot_config.CI_PROVIDERS:
if "cirrus" in cfbot_config.CI_MODULES:
cfbot_cirrus.pull_build_results(conn)
if "travis" in cfbot_config.CI_MODULES:
cfbot_travis.pull_build_results(conn)
cfbot_travis.pull_build_results(conn)

# exchange data with the Commitfest app
Expand Down
2 changes: 1 addition & 1 deletion cfbot_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def process_submission(conn, commitfest_id, submission_id):
else:
# we applied the patch; now make it into a branch with a commit on it
# including the CI control files for all enabled providers
for d in cfbot_config.CI_PROVIDERS:
for d in cfbot_config.CI_MODULES:
for f in os.listdir(d):
s = os.path.join(d, f)
if os.path.isfile(s):
Expand Down
22 changes: 9 additions & 13 deletions cfbot_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,22 +166,18 @@ def build_page(conn, commit_id, commitfest_id, submissions, filter_author, activ
<h1>PostgreSQL Patch Tester</h1>
<p>
Here lives an experimental bot that does this:
<a href="https://commitfest.postgresql.org/%s">Commitfest</a>
<a href="https://commitfest.postgresql.org/%s">PostgreSQL Commitfest</a>
&rarr;
<a href="https://github.com/postgresql-cfbot/postgresql/branches">Github</a>
&rarr;
(
<a href="https://ci.appveyor.com/project/postgresql-cfbot/postgresql/history">AppVeyor</a>,
<a href="https://travis-ci.org/postgresql-cfbot/postgresql/branches">Travis</a>
).
You can find a report for the <a href="index.html">current CF</a>, the
<a href="next.html">next CF</a> or individual patch authors.
<a href="https://ci.appveyor.com/project/postgresql-cfbot/postgresql/history">AppVeyor</a>,
<a href="https://cirrus-ci.com/github/postgresql-cfbot/postgresql">Cirrus CI</a>). We've just changed CI providers, so expect some teething problems as we learn what works best...
</p>
<p>
<a href="index.html">Current commitfest</a> |
<a href="next.html">Next commitfest</a>
</p>
<p>News: Some information about this project can be seen in
<a href="https://speakerdeck.com/macdice/continuous-integration-for-postgresql-commitfests">these slides</a>
from PGCon 2018.
TL;DR: the plan discussed with the pginfra team is to integrate this into
the Commitfest application. May take some time, but watch this space.</p>
<table>
""" % (commitfest_id_for_link,))
for submission in submissions:
Expand Down Expand Up @@ -247,8 +243,8 @@ def build_page(conn, commit_id, commitfest_id, submissions, filter_author, activ
<td width="10%%">%s/%s</td>
<td width="50%%"><a href="https://commitfest.postgresql.org/%s/%s/">%s</a></td>
<td width="20%%">%s</td>
<td width="10%%" align="right">%s</td>
<td width="10%%">%s</td>
<td width="5%%" align="right">%s</td>
<td width="15%%">%s</td>
""" % (submission.commitfest_id, submission.id, submission.commitfest_id, submission.id, name, author_links_string, patch_html, build_results))
f.write(" </tr>\n")
f.write("""
Expand Down
9 changes: 5 additions & 4 deletions cirrus/.cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# patches. It is not part of the PostgreSQL source tree (though maybe one day
# it could be), but can be added to any branch for testing.

# cfbot.cputube.org

# ====== FreeBSD ======
# TODO: backtrace on crash
# TODO: use ccache and preserve ccache folder
Expand Down Expand Up @@ -67,10 +69,9 @@ task:
- su postgres -c 'make -s check-world' || su postgres -c '( for F in ` find . -name initdb.log -o -name regression.diffs ` ; do echo === $F === ; head -1000 $F ; done ; exit 1 )'

# ====== Windows ======
# This doesn't work, some problem with msbuild, but it's super close and has
# worked in the past before some upgrades to the image that I don't understand
# as a non-Windows person...
#
# This doesn't work. I think it's the wrong version of Visual Studio and/or
# msbuild, but I don't understand Windows. Help!

#task:
# name: Windows
# windows_container:
Expand Down

0 comments on commit a62aa6d

Please sign in to comment.