This repository provides a sample Azure DevOps pipeline (azure-pipelines.yml) that can be used as a starting point to deploy a Shopify App.
- The pipeline assumes you're using npm as the package manager.
- The pipeline assumes you've selected Rust to code your functions (if any).
- The pipeline assumes you have a
package-lock.json
file. It uses the hash of this file as part of the cache key. If you've selected to.gitignore
this file, change the variablenpmModulesCacheKey
topackage.json
instead.
- Add the
azure-pipelines.yml
file included in this repository to yours. - Add a secret variable named
cliPartnerToken
to your Azure DevOps pipeline as documented here. - Edit the
azure-pipelines.yml
file to set a value for the variablesappClientId
andfunctionFolders
- Verify that your files are structured as explained in the folder structure below.
If not, make the necessary adjustments in the
azure-pipelines.yml
file.
The pipeline assumes a folder structure similar to this:
├── azure-pipelines.yml
└── src
├── package.json
├── package-lock.json
├── .env
├── shopify.app.toml
└── extensions
├── sample-function
| ├── src
| | ├── .rs
| | └── ...
| ├── Cargo.toml (note uppercase C)
| ├── cargo.lock (note lowercase c)
| └── shopify.function.extension.toml
├── extensions
| ├── assets
| ├── blocks
| ├── locales
| ├── snippets
| └── shopify.function.extension.toml
└── ...
- The pipeline caches the
node_modules
folder. The cache is automatically broken when thepackage-lock.json
file is changed (cf. variablenpmModulesCacheKey
). To manually break the cache increment the variablenpmModulesCacheVersion
- The pipeline caches the output generated by
cargo wasi
. The cache is automatically broken when thecargo.toml
file is changed (e.g. the package version parameter) or thecargo.lock
file is changed (e.g. when a resolved dependency is changed). To manually break the cache increment the variablewasmCacheVersion