Optimizely runs four types of apps on OCP, all defined by the naming convention and the use of tags.
- Released Apps - Apps released to production are available in the OCP App Directory.
- Private Apps - Apps that have been released to production, but their availability in the OCP App Directory is limited to one or more accounts.
- Beta Apps - Apps that have NOT been released to production but can be shared via private URLs for testing.
- Dev Apps - Apps that have NOT been released to production. These apps cannot be shared and are limited to running in the developer's given account.
We are working with a Dev app for our "getting started" purposes. Below is a brief introduction to the app naming convention and its use on the OCP platform.
We follow the Semantic Versioning (semver) specification of version management for apps built on the OCP platform.
All of our apps follow the semver.org standards, given a version number MAJOR.MINOR.PATCH, we increment:
- The MAJOR version when you make an incompatible API change
- The MINOR version, when you add functionality in a backward-compatible manner, and
- PATCH version when you make backward-compatible bug fixes.
We also support two types of pre-release tags,
-dev. Any app with a pre-release tag is not globally visible inside the app directory and is intended to serve as a work in progress.
Recall the versioning of the app you have built is in the following format:
If you have been following along, recall for the example app we have built, the app's name and version is
\-devidentifies your build as pre-release
- .VERSION is the pre-release incrementer
The role of pre-release versioning is to allow you to work on a single train of code, a consistently named MAJOR.MINOR.PATCH version of code, where you increment the pre-release tag as necessary until you are ready for your production release.
For example, imagine your next OCP app release will be 2.1.9. During your development work, you end up with four pre-release versions before you are ready for the final release. Your versioning would look like this:
- 2.1.9-dev.1 - This is your first pre-release version
- 2.1.9_dev.2 - This is your second pre-release version
- 2.1.9_dev.3 - This is your third pre-release version
- 2.1.9_dev.4 - This is your fourth pre-release version
- 2.1.9 - This is your release version
The pre-release tag and versioning allowed you to modify your release without incrementing the MAJOR, MINOR or PATCH numbers. Your release ID remains consistent while you work on your code, only incrementing the pre-release tag as you work.
This is what we are going to do with your new app. We will modify the pre-release tag you started with from .1 to .2 while maintaining the MAJOR, MINOR and PATCH version numbers.
Developers can only publish
-dev pre-release tags. The
-dev tag allows you to work in a sandbox environment without formal code review and without the ability to impact other apps, users, and accounts. The apps you build like this are hidden from the App Directory, so there is privacy, and other users are prevented from seeing or using your apps.
- Update the app.yml file for your app on your local machine. Increment the pre-release version to .2 and save your changes. In our example, that looks like this:
- Switch your terminal into the directory where your target code is located. In our example, it's C:\Source Code\my-marketing-app:
PS C:\Source Code\my-marketing-app>
- From the working directory, execute the following command: `opti app upload'. This will upload the latest version of your app. Your result should look like this:
opti directory publish <app_name>@<app_version>to publish your updated app. In our case the command is
opti directory publish [email protected]:
opti directory install <app_name>@<app_version>to install your app to the App Directory. In our case, the command is
opti directory install [email protected]:
At this time, your updated, pre-release version of your app is now published ONLY to your private version of the App Directory.
Notice how the pre-release tag has been incremented to
Updated 3 months ago