Creating versions is only available for custom apps.
With subscription apps you do not manage the available versions, though you have access to all published versions for the Marketplace app you’re subscribed to.
An app version represents a specific executable code. You can think of a version like a Git commit tag. It is a snapshot of the code at a specific point in time.
- In the case of an interpreted language like Python, the version is the set of files that make up the app.
- In the case of a compiled language like Go, the version is an executable binary.
Once a version is created, the executable code will always be attached to this version no matter how many other ones are published. This is, the code is versioned. You can update the name and description of a version, but you cannot change the referenced executable.
Versions that are published to a subscription app are of the form v<Major>.<Minor>.<Patch>
. When associating an instance to a version, you can use either:
- The complete version, i.e.:
v1.0.2
. - The major version, i.e.:
v1
. In this case, the instance will always be assigned the most recently published complete version that matches the given major version.
For example, if an instance uses version v1
, and the most recently published executable code is changing from version v1.0.2
to v.1.1.0
, new runs will start using the code associated to v1.1.0
. You can think of this behavior as an auto-update, and it is the default behavior for subscription apps.
Whenever you need to create a version (for custom apps):
- Deploy your custom app.
- Create the new version.
Create a version
To create a version in a custom app, define the desired version ID. After, you can use the following interfaces:
Console. Go to Console, and open your app. Add a new version from the
Versions
tabs. Fill in the fields.Nextmv CLI. Anywhere on your machine, run the following command:
Cloud API. Make sure your
NEXTMV_API_KEY
is exported as an environment variable. The API uses Bearer Authentication.POSThttps://api.cloud.nextmv.io/v1/applications/{application_id}/versionsCreate new version.
Create new application version using the current dev binary.
Delete a version
Delete a version using the following interfaces:
- Nextmv CLI. Anywhere on your machine, run the following command:
Cloud API. Make sure your
NEXTMV_API_KEY
is exported as an environment variable. The API uses Bearer Authentication.DELETEhttps://api.cloud.nextmv.io/v1/applications/{application_id}/versions/{version_id}Delete version.
Delete version, specified by application and version ID.
Update a version
Update a version (name, description, etc...) using the following interfaces:
Console. Go to Console, and open your app. Open the
Versions
tab. Click on the version and theEdit
button.Nextmv CLI. Anywhere on your machine, use the
app version update
subcommand.Cloud API. Make sure your
NEXTMV_API_KEY
is exported as an environment variable. The API uses Bearer Authentication.PUThttps://api.cloud.nextmv.io/v1/applications/{application_id}/versions/{version_id}Update version information.
Update application version information with defined data, specified by application and version ID.