Publishing with CI¶
If running in a
virtualenv setup, ensure any environment
variables used are configured to be passed through to the virtual
As of v1.9, this extension can automatically accept configuration options
from the environment that have not been explicitly set in
provided by the command line. For example, to configure for
authentication using a personal access token using the environment, do
conf.py and ensure the
CONFLUENCE_PUBLISH_TOKEN environment variable is set.
For users performing automatic publishing through a CI system, they may wish to authenticate their publish event with a secret key. A common approach to applying a secret key is through an environment variable. For example, if authenticating with an API key (see API tokens), the following can be used:
confluence_server_user = 'api-key-uid'
confluence_server_pass = os.getenv('SECRET_KEY')
Or, if using a personal access token (see Using Personal Access Tokens), the following can be used:
confluence_publish_token = os.getenv('SECRET_KEY')
Both examples above will read an environment variable
in a CI environment to be used for authentication.