package.json:
package.json
azure-pipelines.yml in your repository with the following
contents:
azure-pipelines.yml
Authentication
To run any commands, you must authenticate with Momentic by providing theMOMENTIC_API_KEY environment variable.
- Create an API key in the Momentic dashboard and copy the value.
- Add it as a
secret pipeline variable
named
MOMENTIC_API_KEY(mark it as secret so it is masked in logs). Avoid committing it to the pipeline file. - Secret variables are not exposed to scripts automatically, so map it into the
environment of each
momenticstep withenv:, as shown above.
Sharding
If you have a large test set, you can use sharding to run tests in parallel. This can significantly speed up your CI runs. Use a parallel job strategy and read the 1-indexedSystem.JobPositionInPhase and total
System.TotalJobsInPhase for --shard-index / --shard-count. To collect
every shard into a single run group in the dashboard, add a job that merges and
uploads results after the tests finish.
azure-pipelines.yml