Managing Releases with the CLI
This topic describes how to use the replicated CLI to create and promote versions of your application.
Replicated recommends using a git-based workflow. For more information about repository workflows and tagging, see Repository Workflow and Tagging Releases. For examples of CI/CD integration, see Tutorial: Integrating with an Existing CI/CD PLatform.
Create a Release
Before you can create your first release using the replicated CLI, make sure that the following requirements are met:
Install the replicated CLI. See Installing the replicated CLI.
Create a new application using the
replicated app create APP_NAME
command. You only need to do this procedure one time for each application that you want to deploy. Seeapp create
in Reference.If you are using Helm charts, make sure that you first create the Helm chart package. See Creating a Helm Chart Package.
Make sure that you have an application directory that contains your application files.
To create and promote a new release:
Export the token environment variable. The token environment variable is valid for a single session. You must export it for each new session.
Lint the application manifest files and ensure that there are no errors in the YAML:
replicated release lint --yaml-dir=PATH_TO_APP_DIR
Replace
PATH_TO_APP_DIR
with path to the directory of the application files.For more information about linting, see release lint and Linter Rules in Reference.
Create a new release:
replicated release create --yaml-dir PATH_TO_APP_DIR
Replace
PATH_TO_APP_DIR
with the path to the directory of the application files.For more information, see release create or release update in Reference.
Continue to edit and lint the release as needed, then update the release:
replicated release update SEQUENCE --yaml-dir PATH-TO-APP-DIRECTORY
Replace:
SEQUENCE
with the release sequence number. This identifies the existing release to be updated.PATH_TO_APP_DIR
with the path to the directory of the application files.
For more information, see release update in Reference.
Promote the release when you are ready to test it. Releases cannot be edited after they are promoted. To make changes after promotion, you have to create a new release.
replicated release promote SEQUENCE CHANNEL_ID
Replace:
SEQUENCE
with the release sequence number.CHANNEL_ID
with the channel ID or case sensitive name of the channel.
For more information, see release promote in the replicated CLI documentation.
Verify that the release was promoted to the channel:
replicated release ls