Skip to content

amandahla/operator-workflows

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

operator-workflows

Description

This repository includes several parametrized CI workflows to be used for both kubernetes and machine charms.

Usage

To use the workflows in your repository, just reuse them including the secrets: inherit key. Examples of usage for every workflow can be found at the indico operator. Note that you will need a CHARMHUB_TOKEN among your repository secrets to be able to run the workflows that interact with charmhub.

The following workflows are available:

  • test: executes the default tox targets defined in the tox.ini file and generates a plain text report. This requires the lint, unit, static and coverage-report tox environments to be included in the tox defaults. The following parameters are available for this workflow:
Name Type Default Description
working-directory string "./" Directory where jobs should be executed
  • comment: Posts the content of the artifact specified as a comment in a PR. It needs to be triggered from a PR triggered workflow.

  • integration_test: Builds the existing Dockerfiles, if any, and executes the integration test target defined in the tox.ini file. The following parameters are available for this workflow:

Name Type Default Description
extra-arguments string "" Additional arguments to pass to the integration test execution
pre-run-script string "" Path to the bash script to be run before the integration tests
provider string microk8s Actions operator provider as defined here
series string '[""]' List of series to run the tests in JSON format, i.e. '["jammy", "focal"]'. Each element will be passed to pytest through tox as --series argument
modules string '[""]' List of modules to run in parallel in JSON format, i.e. '["foo", "bar"]'. Each element will be passed to pytest through tox as -k argument
setup-devstack-swift bool false Use setup-devstack-swift action to prepare a swift server for testing.
  • test_and_publish_charm: Builds and publishes the charm and its resources to appropriate channel, as defined here. The following parameters are available for this workflow:
Name Type Default Description
integration-test-extra-arguments string "" Additional arguments to pass to the integration test execution
integration-test-pre-run-script string "" Path to the bash script to be run before the integration tests
integration-test-provider string microk8s Actions operator provider as defined here
integration-test-series string '[""]' List of series to run the tests in JSON format, i.e. '["jammy", "focal"]'. Each element will be passed to pytest through tox as --series argument
integration-test-modules string '[""]' List of modules to run in parallel in JSON format, i.e. '["foo", "bar"]'. Each element will be passed to pytest through tox as -k argument
setup-devstack-swift bool false Use setup-devstack-swift action to prepare a swift server for integration tests.

The runner image will be set to the value of bases[0].build-on[0] in the charmcraft.yaml file, defaulting to ubuntu-22.04 if the file does not exist.

  • promote_charm: Promotes a charm from the selected origin channel to the selected target channel. . The following parameters are available for this workflow:
Name Type Default Description
destination-channel string "" Destination channel
origin-channel string "" Origin channel

The runner image will be set to the value of bases[0].build-on[0] in the charmcraft.yaml file, defaulting to ubuntu-22.04 if the file does not exist.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 69.1%
  • Python 30.9%