Integration · CI/CD · via REST API
Add a job that refreshes the test database before your test stage. The job calls the Synthesized REST API with a masked CI/CD variable, waits for the workflow, and fails the pipeline if the data isn't ready.
There is no GitLab component; this pattern uses the documented REST API.
| How it connects | A job runs a script that starts a workflow with POST /external/api/v1/workflow/{id}/run and polls GET /workflow-run/{id}. |
|---|---|
| Secrets | GOVERNOR_ACCESS_KEY as a masked and hidden, protected CI/CD variable. |
| Ordering | needs makes the test job wait for the data job; resource_group stops two refreshes running at once. |
| Scheduling | Pipeline schedules, with rules on $CI_PIPELINE_SOURCE. |
| Status | Works through the REST API. GitLab isn't named in the Synthesized docs; the API calls are. |
Create the masking, subsetting or generation workflow and run it once by hand. Note its workflow ID.
Under Settings › CI/CD › Variables, add GOVERNOR_URL, WORKFLOW_ID and GOVERNOR_ACCESS_KEY (masked and hidden, protected).
Add run-synthesized-workflow.sh to the repository. It exits non-zero if the run fails, which fails the job.
Add the two jobs below, then create a pipeline schedule for the nightly refresh.
The data job runs on scheduled and manually started pipelines; the test job waits for it when it runs.
.gitlab-ci.yml
scripts/run-synthesized-workflow.sh
An access key carries the permissions of the Governor user who generated it. Create a user that can reach only the workflows this pipeline runs, generate the key as that user, and give it a short expiry: keys are chosen from 1 hour to a year, and the docs say they can't yet be revoked.
Two runs can't write to the same output database at the same time. If parallel pipelines or branches need data, give each environment its own workflow or output database.
Workers read the source, mask, subset or generate, and write the target. Database contents stay with the workers and aren't sent to Governor, which, like the pipeline, only sees run status, logs and configuration. Run Synthesized on-premises, including air-gapped, and the data never leaves your environment; it is also available as SaaS.
No. A CI/CD job calls the Synthesized REST API, so it works with any GitLab setup that can reach your Governor over HTTPS. You need an HTTP client (the examples use curl and jq), the Governor URL, a workflow ID and an access key.
Add it under Settings › CI/CD › Variables with Visibility set to Masked and hidden, and tick Protect variable so only pipelines on protected branches and tags can read it. Masking needs a single-line value of at least 8 characters.
Create a pipeline schedule for the branch. The example's rules run the data job on scheduled and manually started pipelines.
Give the job a resource_group. GitLab then runs only one job in that group at a time, which matches Synthesized's rule that two runs can't write to the same output database at once.
Only if Governor can be reached from the internet. For an internal Governor, use a runner inside your network.
Bring one GitLab pipeline that waits on test data, and see a Synthesized workflow refresh it before the tests run.
GitLab is a trademark of GitLab Inc. All other product names are trademarks of their respective owners.