samvera / samvera-circleci-orb

An orb with a set of tasks to centralize testing infrastructure for Samvera Core Components
Apache License 2.0
0 stars 3 forks source link
core-components samvera-community

Samvera CircleCI Orb

Code: Samvera Core Component Build Status Version

Docs: Contribution Guidelines Apache 2.0 License

Community Support: Samvera Community Slack

What is the CircleCI Orb?

The Samvera CircleCI Orb is meant to make testing Samvera and Samvera-based projects easier. The orb provides executors that include common Samvera dependencies, and commands to help set up and run your tests.

More information about orbs in general is available in CircleCI's docs, and up-to-date documentation about the Samvera orb exists on the orb's CircleCI page

Product Owner & Maintenance

samvera-circleci-orb was a Core Component of the Samvera Community. Given a decline in available labor required for maintenance, this project no longer has a dedicated Product Owner. The documentation for what this means can be found here.

Product Owner

Vacant

_Until a Product Owner has been identified, we ask that you please direct all requests for support, bug reports, and general questions to the #dev Channel on the Samvera Slack._

Help

The Samvera community is here to help. Please see our support guide.

Using the orb

Since using the orb depends on Circle's configuration API, this section will attempt to point you to the latest documentation rather than copying docs that may become outdated quickly.

If you are not yet using CircleCI, please start with their introduction documentation

The canonical documentation for setting up the orb is in the Quick Start Guide on the orb's CircleCI page.

Once you have finished with the Quick Start, the executors and commands will be available for use in your config. The executors are named for the dependencies they include (ruby, ruby_fcrepo_solr, etc.), and the commands are named and documented to avoid surprises.

Circle has general information about executors, and commands that may be useful as well.

Best practices

The executors allow you to set parameters for the dependencies they use. For instance, you could have in your parameters

solr_version:
    type: string
    default: '7-slim'

or in your build matrix:

ruby_type: 'ruby'

Different dependencies have different parameters, but all of them allow you to specify a version. You should do this! The orb is permissive in the versions it allows, and may surprise you by upgrading when you least expect it.

Be prepared! Control your destiny! Specify versions!

Releasing new versions

The orb will automatically publish two dev versions with every build that passes checks. The first is always dev:alpha. Since this is not a unique identifier, this version may be quickly overwritten. The other is dev:<SHA1>, where the SHA1 is the first seven characters of the commit hash that was built. Orb versions that begin with dev: can be overwritten by anyone, and only exist for 90 days.

Additionally, publishing dev and production versions of the orb can be done manually:

  1. Install the CircleCI Client - https://circleci.com/docs/2.0/local-cli/#installation
  2. circleci setup (You'll need an API key)
  3. circleci config pack src > src/orb.yml
  4. circleci orb validate src/orb.yml
  5. circleci orb publish src/orb.yml samvera/circleci-orb@dev:alpha
  6. If Ready for permanent version bump: circleci orb publish promote samvera/circleci-orb@dev:alpha [major/minor/patch]

Acknowledgments

This software has been developed by and is brought to you by the Samvera community. Learn more at the Samvera website.

Samvera Logo

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/samvera/samvera-circleci-orb/.

If you're working on PR for this project, create a feature branch off of main.

This repository follows the Samvera Community Code of Conduct and language recommendations. Please do not create a branch called master for this repository or as part of your pull request; the branch will either need to be removed or renamed before it can be considered for inclusion in the code base and history of this repository.