Skip to content

Rework CI config to match current standards #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 6 additions & 32 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: daily
on:
schedule:
Expand All @@ -19,8 +20,8 @@ jobs:
- core+ext/openjdk17/pg-15
- core+ext/openjdk11/pg-11

branch: [7.x, main]
os: [ubuntu-20.04]
branch: main
os: [ubuntu-24.04]
ruby: ['3.2']

# Defaults for special-case influencing vars
Expand All @@ -30,47 +31,20 @@ jobs:

# Special cases
include:
- os: ubuntu-20.04
- os: ubuntu-24.04
ruby: '3.2'
flavor: core+ext/openjdk11/pg-16
drop-joins: by-request
- os: ubuntu-20.04
- os: ubuntu-24.04
ruby: '3.2'
flavor: core+ext/openjdk11/pg-16
lein-profile: fips

# non-rich variants for main
- os: ubuntu-20.04
- os: ubuntu-24.04
branch: main
ruby: '3.2'
flavor: int/openjdk11/pup-main/srv-main/pg-16
- os: ubuntu-20.04
branch: main
ruby: '2.7'
flavor: int/openjdk11/pup-7.x/srv-7.x/pg-16

# non-rich variants for 7.x
- os: ubuntu-20.04
branch: 7.x
ruby: '2.5'
flavor: int/openjdk11/pup-6.x/srv-6.x/pg-11
- os: ubuntu-20.04
branch: 7.x
ruby: '2.7'
flavor: int/openjdk11/pup-7.x/srv-7.x/pg-11

# OpenJDK 8 testing, only on 7.x
- os: ubuntu-20.04
branch: 7.x
ruby: '2.7'
flavor: core+ext/openjdk8/pg-11

# Test deprecated streaming on 7.x
- os: ubuntu-20.04
branch: 7.x
ruby: '2.7'
flavor: core+ext/openjdk11/pg-11
deprecated-query-streaming: 'by-request'

steps:
- name: Compute job outputs
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
name: main
on: [push, pull_request]
on:
pull_request: {}
push:
branches:
- main

jobs:
# We use "o" as the name to keep it short since the flavor repeats
Expand All @@ -21,7 +26,7 @@ jobs:
- rspec/pup-main
- lint/openjdk17

os: [ubuntu-20.04]
os: [ubuntu-24.04]
ruby: ['3.2']

# Defaults for special-case influencing vars
Expand All @@ -32,11 +37,8 @@ jobs:
include:
# integration
- flavor: int/openjdk17/pup-main/srv-main/pg-16/rich
os: ubuntu-20.04
os: ubuntu-24.04
ruby: '3.2'
- flavor: int/openjdk17/pup-7.x/srv-7.x/pg-14/rich
os: ubuntu-20.04
ruby: '2.7'

steps:
- name: Compute job outputs
Expand Down
9 changes: 0 additions & 9 deletions ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,8 @@ Prepares the CI machine for tests and runs tests using `ci/bin/run`.
### `ci/bin/run`
Runs tests on a prepared CI machine.

### `ci/bin/travis-on-success`
Runs when FOSS PDB Travis tests succeed. Triggers tests on same branch name for extensions repo. Referenced in `.travis.yml`.

## CI Configuration

### `.travis.yml`
Travis CI configuration. Main CI test runner. Runs core, external, integration, rspec, and container tests in a variety of forms. Notifies Slack with results. See https://travis-ci.com/puppetlabs/puppetdb.

### `.github/workflows/main.yml`
On pull request and push runs core, external, integration, and rspec tests on MacOS machines. Also runs lint test on an Ubuntu machine.

Expand All @@ -151,9 +145,6 @@ On push to `doc-latest` or `doc-6.y` builds and uploads docs to Puppet's s3 buck
### `.github/workflows/snyk.yml`
On push to `6.x` and `main`, run Snyk security scanning tests.

## Internal Jenkins CI Configuration
Both FOSS PuppetDB and PuppetDB Extensions repos are tested with other Puppet Enterprise components internally using a [private Jenkins instance](https://jenkins-enterprise.delivery.puppetlabs.net/view/puppetdb). The CI jobs are defined by [Jenkins Job Builder](https://jenkins-job-builder.readthedocs.io/en/latest) YAML files. They live in the [private ci-job-configs repo](https://github.com/puppetlabs/ci-job-configs). The most important PuppetDB files in that repo are:

### `doc/pipelines/enterprise.md`
Overview of whole Jenkins setup. Documents global parameters which can be used by any project.

Expand Down
24 changes: 0 additions & 24 deletions ci/bin/prep-and-run-in
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,6 @@ test $# -eq 2 || misuse
host_type="$1"
spec="$2"

# If running on a MacOS instance in Travis...
if [ "$host_type" = travis ] && [[ "$OSTYPE" != darwin* ]]; then
# Workaround for mongodb, CouchDB and git-lfs having invalid keys
# see: https://github.com/travis-ci/travis-ci/issues/9037 (which
# is still broken)
sudo -i rm -f /etc/apt/sources.list.d/mongodb*
sudo -i rm -f /etc/apt/sources.list.d/couchdb*
sudo -i apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 762E3157

# See https://github.com/pyenv/pyenv/issues/789 When using the
# system python pyenv prepends /usr/bin to the path which breaks
# anything that tries to override system defaults, like rvm/rbenv
pyenv global 3.7.13

# Have to purge some of the existing pg bits so the 11 install
# won't fail with errors like this:
# Refused to start PostgreSQL 11, because PostgreSQL 9.2 is
# currently running! You should first stop 9.2 instance...
# Not sure we have to purge *all* of these, but it works.
sudo -i apt-get purge \
postgresql{,-client}-{9.2,9.3,9.4,9.5,9.6} \
postgresql-client-common postgresql-client postgresql-common
fi

# If machine has apt-get, prepare a Debian environment
if command -v apt-get > /dev/null; then
cmd=$(printf 'cd %q && ext/bin/prep-debianish-root --for %q --install ci/local' \
Expand Down
70 changes: 0 additions & 70 deletions ci/bin/travis-on-success

This file was deleted.

Loading