zeek/ci
2020-02-06 17:47:38 -08:00
..
centos-7 Add Cirrus CI config 2019-12-17 15:28:25 -08:00
debian-9 Add Cirrus CI config 2019-12-17 15:28:25 -08:00
fedora-30 Add Cirrus CI config 2019-12-17 15:28:25 -08:00
freebsd Fix Cirrus CI FreeBSD python dependencies installation 2020-01-06 10:51:17 -08:00
macos Add Cirrus CI config 2019-12-17 15:28:25 -08:00
ubuntu-16.04 Add Cirrus CI config 2019-12-17 15:28:25 -08:00
ubuntu-18.04 Switch CI scripts to use ASAN/LSAN instead of gperftools 2020-01-02 23:04:22 -08:00
build.sh Add Cirrus CI config 2019-12-17 15:28:25 -08:00
init-external-repos.sh Add Cirrus CI config 2019-12-17 15:28:25 -08:00
README Add GitHub Action for CI notification emails 2019-12-18 13:36:40 -08:00
test.sh Use 2 btest retries for CI 2020-02-06 17:47:38 -08:00
travis-job Use 2 btest retries for CI 2020-02-06 17:47:38 -08:00

=========================================
Continuous Integration Configuration Info
=========================================

The following pointers are aimed at maintainers to help describe a few points
about the Cirrus CI setup that may not be obvious/intuitive.

Private Test Suite
------------------

Access to the private test suite is available in CI tasks except in Pull
Requests from people that do not otherwise have write access to the zeek
repository on GitHub.  To configure this access for the
``zeek-testing-private`` repository, it uses a "deploy key" which is a single
purpose SSH key with read-only permissions.  Here's how it can be set up:

1. ``ssh-keygen -f cirrus-key``

2. Add contents of ``cirrus-key.pub`` as a new key on GitHub:
   https://github.com/zeek/zeek-testing-private/settings/keys

3. Generate a new Cirrus CI secured variable in the repository settings at
   https://cirrus-ci.com/github/zeek/zeek.  The value of the secured variable
   is the base64-encoded private key, and can be obtained from the output of
   the command: ``base64 cirrus-key``.

4. Take the ``ENCRYPTED[...]``` string generated by Cirrus and use that as the
   value of ``ZEEK_TESTING_PRIVATE_SSH_KEY`` in ``.cirrus.yml``

5. Delete the local key: ``rm cirrus-key*``

6. Commit/push the changes.

Email Notifications
-------------------

Cirrus CI doesn't feature any way to perform email notifications on failures,
so that is instead handled by a separate GitHub Action:

  https://github.com/jsiwek/ci-email-action

The configuration of that GitHub Action is typical: it's just the
``.github/workflows/ci-notification.yml`` file, which set SMTP/mail info
via secrets stored in GitHub for the Zeek repository:

  https://github.com/zeek/zeek/settings/secrets

The particular values used for those are currently from the Zeek project's AWS
Simple Email Service configuration.