Migration Guide
Use this guide to migrate from older Specmatic setup patterns to the current recommended approach.
1. Migrate to the unified enterprise artifact
Move from protocol-specific legacy artifacts/images to the unified Specmatic Enterprise artifact and image.
This covers:
- Legacy-to-new artifact mapping
- Docker image migration to
specmatic/enterprise - JUnit interface migration to
io.specmatic.enterprise.SpecmaticContractTest
2. Migrate from legacy Insights reporter to specmatic send-report
The following legacy integrations are deprecated:
The GitHub Action above internally invoked the GitHub build reporter. Migrate both to the built-in specmatic send-report command in your CI pipeline.
Why this is better:
- One native Specmatic command instead of a separate reporter integration.
- CTRF-friendly workflows for standardized test result publishing.
- Better looking and more detailed Insights visualization with richer report context.
Recommended sequence:
- Start with Central Contract Repository CI setup.
- Migrate central contract repo reporting (see subsection below).
- Migrate each service build to
send-reportwith CTRF reporting (see subsection below).
Migrate central contract repo reporting
Use this when your central contract repository has a dedicated reporting step:
- Keep pre-merge checks:
spectral lint,specmatic examples validate, andspecmatic backward-compatibility-check. - Add
specmatic central-contract-repo-reporton themainbranch pipeline to generate the central contract report. - Add
specmatic send-reportas a post-build step onmainto publish to Insights. - Keep
send-reportout of PR/MR validation jobs so non-main runs are not published to Insights. - Start from Central Contract Repository CI setup, then append report generation and publish steps.
Migrate each service build to send-report and CTRF reporting
Apply this to every service repository (consumer, BFF/provider, domain service):
- Remove deprecated reporter steps/actions from the CI workflow.
- Keep existing Specmatic test/mock steps as-is.
- Add a post-build
specmatic send-reportstep for themainbranch only. - Pass repository metadata (
branch-name,repo-name,repo-id,repo-url) from CI environment variables. - Ensure license key setup is present before running
send-report. - Enable CTRF output in your Specmatic reporting configuration.
- Publish CTRF artifacts/results in CI as part of the same workflow.
Example migration (GitHub Actions):
# Before (deprecated GitHub Action)
- name: Publish to Insights (deprecated action)
uses: specmatic/specmatic-insights-build-reporter-github-action@v1
with:
org-id: ${{ secrets.SPECMATIC_ORG_ID }}
branch-name: ${{ github.ref_name }}
repo-name: ${{ github.event.repository.name }}
repo-id: ${{ github.repository_id }}
repo-url: ${{ github.event.repository.html_url }}
# Before (deprecated direct reporter)
- name: Publish to Insights (deprecated reporter)
run: |
docker run \
-v ${{ github.workspace }}:/workspace \
specmatic/specmatic-insights-github-build-reporter:latest \
--org-id ${{ secrets.SPECMATIC_ORG_ID }} \
--branch-name ${{ github.ref_name }} \
--repo-name ${{ github.event.repository.name }} \
--repo-id ${{ github.repository_id }} \
--repo-url ${{ github.event.repository.html_url }}
# After (recommended)
- name: Write specmatic license key to file
run: |
mkdir -p ~/.specmatic
echo "${{ secrets.SPECMATIC_LICENSE_KEY }}" > ~/.specmatic/specmatic-license.txt
- name: Publish Build Reports to Specmatic Insights
if: github.ref == 'refs/heads/main'
run: |
# You can use specmatic/enterprise instead of specmatic/specmatic.
docker run --rm \
-v ~/.specmatic:/root/.specmatic \
-v ${{ github.workspace }}:/usr/src/app \
specmatic/specmatic \
send-report \
--branch-name ${{ github.ref_name }} \
--repo-name ${{ github.event.repository.name }} \
--repo-id ${{ github.repository_id }} \
--repo-url ${{ github.event.repository.html_url }}
Reference examples:
- Insights CI/CD integration examples
- Continuous Integration walkthrough for service projects
- BFF CTRF workflow examples
- CTRF report configuration
3. Migrate configuration from v2 to v3
Move from provides/consumes-centric configuration to the v3 model with explicit:
systemUnderTestdependencies.services- Reusable
components(sources,services,runOptions)
Reference: