CI/CD workflow integration
Here we are going to discuss how to integrate Diffy with your CI workflow.
First of all, you will need to install our CLI tool. If you are using something like CircleCI you could install it with
wget https://github.com/DiffyWebsite/diffy-cli/releases/download/0.1.2/diffy.phar diffy
chmod u+x diffy
Then you need to authenticate the tool with your API key. You can find it under My Account -> Keys in the app's UI.
diffy auth:login $DIFFY_API_KEY
We highly recommend keeping API's key as an environmental variable in your CI. Here is an example of how Circle CI and Bitbucket do that.
Next, you can run your compare command (or any other that makes sense).
For example, if you compare just two environments (on the event of rebuilding staging environment)
diffy project:compare $DIFFY_PROJECT_ID prod stage
Or if you are building custom environments per pull request your command could look like
CUSTOM_URL="https://custom-pr-$BITBUCKET_PR_ID-skdspe.platform.sh" diffy project:compare $DIFFY_PROJECT_ID prod custom --env1Url=$CUSTOM_URL
Please let us know if you find difficulties with implementing CI workflow. We are happy to help and enhance documentation.