A testing specification string. The element is the test flavor and the trailing elements describe dependency information (JDK, PostgreSQL, Puppet, Puppet Server). Examples:
core/openjdk8/pg-9.6
int/openjdk11/pup-6.x/srv-6.x/pg-11
core+ext/openjdk11/pg-11/rich
rspec/pup-6.x
The first element of the spec string describing which test suite to run. One of:
core
(lein test
)ext
(external tests on PuppetDB jar)core+ext
(both core and external tests)int
(integration tests with Puppet and Puppet Server)lint
(check Clojure code with Eastwood and clj-kondo)rspec
The version number or branch name of an element of the spec. Anything that comes after the hyphen if there is one. The ref of pg-9.6
is 9.6
. The ref of pup-6.x
is 6.x
.
The JDK package name like openjdk8
.
Creates symbolic link to a relative path. Relative path is forced even if absolute is given.
Outputs sha256 checksum of STDIN
Modify local testing environment to use specific version of Puppet.
Modify local testing environment to use specific version of Puppet Server.
Get, set, or reset persistent test configuration values by storing them in local files in the directory ext/test-conf
Parses a test spec string and prints the test flavor (type of tests to run like core or lint)
Ensures that correct JDK is installed and test flavor is valid.
Prints search string if its a component of test spec.
Parses a test spec string and prints the JDK package name
Parses a test spec for a given element (like pg-13) and prints the ref (version number)
Prints information about installed JDK
- Can output full version (
1.8.0_172
), major version (8
), or package/spec (openjdk8
)
Installs JDK onto machine
Installs Leiningen onto machine
Installs pgbox onto machine
Prepares Debian-like Linux machines for running PuppetDB tests
Prepares MacOS machines for running PuppetDB tests
Creates a local PuppetDB sandbox directory which contains a PostgreSQL sandbox
Sets up environment variables and runs a command using pgbox env
Runs a command using new, empheral PuppetDB sandbox (with an ephemeral PostgreSQL sandbox inside of it). Starts PostgreSQL and runs a command using the sandboxes. Destroys sandboxes and stops PostgreSQL afterwards.
Runs a command using ephemeral Leiningen and pgbox executables, as well as ephemeral PuppetDB and PostgreSQL sandboxes. User still needs PostgreSQL and JDK installed. Passes command to ext/bin/with-pdbbox
which creates the ephemeral sandboxes.
Exactly the same as ext/bin/boxed-core-tests
except uses this for the temporary directory name (starts with int-test
).
Creates a PuppetDB uberjar and runs some tests on its behavior and output.
Run Ruby rspec tests on Ruby code in puppet
directory.
Runs core, integration, and external tests with boxed-core-tests
, boxed-integration-tests
, and run-external-tests
respectively. Also prints log lines saying which script is running.
Tests an existing PuppetDB jar to to see if it gracefully shuts down on an OutOfMemoryError when forced to allocate a giant amount of memory.
Tests an existing PuppetDB jar's command line interface by running subcommands and grepping the output.
Verifies that a PuppetDB jar will periodically check and shut down when the database is at an unrecognized schema (migration) number.
Ensures PuppetDB jar fails to start and logs error message when the PuppetDB PostgreSQL database is not migrated to the most recent migration that PuppetDB knows about.
Given two git tags, prints out a list of contributors who authored commits in that commit range.
Creates an SVG graph of the PuppetDB PostgreSQL schema for educational purposes. Requires postgresql-autodoc and graphiz.
Automates the release tagging process for PuppetDB. This script tags and pushes both release branches for FOSS and extensions (four total branches) at once.
In top-level of source tree. Starts an existing PuppetDB uberjar and passes all arguments. Allows overriding of Bouncy Castle jars.
Prepares the CI machine for tests and runs tests using ci/bin/run
.
Runs tests on a prepared CI machine.
Runs when FOSS PDB Travis tests succeed. Triggers tests on same branch name for extensions repo. Referenced in .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.
On pull request and push runs core, external, integration, and rspec tests on MacOS machines. Also runs lint test on an Ubuntu machine.
On pull request runs dita
doc-building command and tests for failure.
On push to doc-latest
or doc-6.y
builds and uploads docs to Puppet's s3 bucket which gets used by puppet.com/docs.
On push to 6.x
and main
, run Snyk security scanning tests.
Both FOSS PuppetDB and PuppetDB Extensions repos are tested with other Puppet Enterprise components internally using a private Jenkins instance. The CI jobs are defined by Jenkins Job Builder YAML files. They live in the private ci-job-configs repo. The most important PuppetDB files in that repo are:
Overview of whole Jenkins setup. Documents global parameters which can be used by any project.
Overview of PuppetDB Jenkins setup. Documents PuppetDB-specific parameters.
Defines the PuppetDB projects.
Defines the PuppetDB job groups.
PuppetDB is published as Docker image, although supporting it is not currently a priority.
- prep: Git fetches all latest commits and tags
- lint: Lints
docker/puppetdb/Dockerfile
withhadolint
- build: Builds image with
docker buildx
- test: Runs Ruby rspec tests
- push-image: Push docker image to dockerhub
- push-readme: Update dockerhub README
- publish: Runs push-image and push-readme