nrwl / nx-azure-build

Example of setting up distributed Azure build for Nx workspace
114 stars 38 forks source link

Nx cloud integration #5

Open elvirdolic opened 4 years ago

elvirdolic commented 4 years ago

Would be nice to see how does this work with nx cloud. I have set the nx cloud env variable but it doesn’t work

rinckd commented 3 years ago

This video shows you the basic setup for CI-CD: https://www.youtube.com/watch?v=w1-GiB74ddc

There are a couple steps unique to Azure DevOps.

In your pipeline add a variable. atx-apps-ci_-_Pipelines

Then, for each script in the azure-pipelines.yml, pass the variable in:

          - script: node ./tools/scripts/run-many.js '$(COMMANDS)' build1 build '$(environment)'
            env: { NX_CLOUD_AUTH_TOKEN: $(NX_CLOUD_AUTH_TOKEN) }

The first run will likely cache, but with subsequent builds you will see it read from the cache.

Hope this helps!