No project description provided
Project description
README
This is a framework to integrate ServiceNow data into a CI/CD pipeline.
with Context("/table/mytable", validator=Record) as ctx:
# if needed, filter records, grouping, further validation... can be done
update_yaml("test.yaml", ctx.data)
We assume that the workflow is standard:
- Get one resource from ServiceNow (e.g. "/table/incident")
- Validate the data received
- Store the data
- Commit and push all changes
Nb: if needed, this library provide lower level utilities.
How it works
- Every variables are taken from environment variables. (see below)
- This will create a
timestamp.txt
file with the last run. This file must be cached for the next run - This will automaticly clone the target repository
- The data is retrieved and validated against a validator. We recommend to use pydantic library for the validation
ctx.data
will contain a list a dict containing at leastsys_id
entry that is unique
Environment variables
Here is the list of the possible environment variables
client.Client
- SNOW_INSTANCE: ServiceNow instance (e.g. "myinstance" in
https://myinstance.servicenow.com
) - SNOW_USER: The ServiceNow user to use
- SNOW_PASSWORD: The password of the ServiceNow user Additional:
- SNOW_CLIENT_ID: Used for OAuth2.0 protocol
- SNOW_CLIENT_SECRET: Used for OAuth2.0 protocol
git.Git
- GIT_URL: git URL for http connection (it can contain the credentials, making GIT_USER/GIT_PASSWORD useless) E.g. "https://{login}:{password}@gitlab.com/owner/project.git" Additional:
- GIT_USER: git user for http connection (injected into the provided url)
- GIT_PASSWORD: git password for http connection (injected into the provided url). For Gitlab, this can be the token
- GIT_AUTHOR_NAME: author of the commit
- GIT_AUTHOR_EMAIL: email of the commit author
- GIT_BRANCH: The branch to edit (create it if it doesn't exist). Default to the default branch
- GIT_SRC_BRANCH: The source branch from which to create the working branch
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
snowd-0.1.3.tar.gz
(8.5 kB
view details)
Built Distribution
snowd-0.1.3-py3-none-any.whl
(9.5 kB
view details)
File details
Details for the file snowd-0.1.3.tar.gz
.
File metadata
- Download URL: snowd-0.1.3.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac717ba1748b79b1ffb32d919ebe08aa3c175f48383e6e062331a81a0888da4e |
|
MD5 | 07ab4f2fcc981bdec2d91b2b60a70298 |
|
BLAKE2b-256 | 1dce3e5dc27cc7b7cf39b27561e81321d45dfa79ea81b2869ed942270d7561bb |
File details
Details for the file snowd-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: snowd-0.1.3-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e2e9316863620fb63e240d84090bf518bb33898fd81dd39e2f1c364e92198d8 |
|
MD5 | 6bf2bd0f48fbebc36563ae70bc7aedb4 |
|
BLAKE2b-256 | 912b50dc8f25c816752ec99b3f23f46876dc15f2d2efd7169c7d90ea552071fd |