Publishing an app
After releasing an app version, you must also validate its changes by running A/B tests and trying its new settings.
However, since it is not possible to install an app that exists only in a local environment, you must first publish it and then install it in the desired account to run tests.
Step by step
- Make sure the app you are about to publish has already been released.
️ To publish your app, you must be logged in to the account responsible for the app development. Make sure the app’s
vendor
is equal to theaccount
you are logged in.
- In your terminal, run the
vtex publish
command in the folder of your app.
️ Remember to replace the values between the curly brackets according to your scenario.
By performing this action, you will turn the new app version in which you were working into a candidate version.
️ A candidate version is an app version that meets all the requirements needed to be deployed.
-
Using a Production workspace, install the candidate version by indicating to the VTEX IO CLI the new app's exact version.
-
Test the candidate version’s stability by means of an A/B test.
️ If you are releasing a beta version and have already tested all the app settings, to proceed to the next steps, you must first: release a non-beta version, publish it, install it in a production workspace, and test it once more using the A/B test.
- If all the app changes have already been tested and everything is working as expected, run the
vtex deploy {appvendor}.{appname}@{appversion}
command.
️ After publishing an app, you must wait 7 minutes to deploy it. Otherwise, you'll receive an "Invalid state transition" error from the VTEX IO CLI. However, if you are using a VTEX IO CLI version higher than
2.118.0
and deploying a hotfix, you can use the--force
flag to instantly deploy your app version.
By performing this action, you'll publish the candidate version as a stable version. Also, Housekeeper will automatically update the new app stable version on all accounts that have the app installed.
️ Publishing an app is one of the steps to making your code's new version public. For more details on how to make your app available to your end-users and to better understand the full procedure, access the recipe on Making your new app version publicly available.
Updated about 8 hours ago