LogoLogo
CS CONSOLECOMMUNITYDOCS
  • What is code.store?
  • Our vision
  • How it works?
  • Getting started
    • Quick Start
      • Core concepts
      • Quick Start with CLI
      • Quick Start with Web Interface
    • FUNDAMENTALS
      • Services
        • GraphQL
        • REST
        • Configuration
        • Environment Variables
      • Environments
      • Projects
      • Versioning
      • Access and Authorization
      • Secret management
      • Data management
        • Import and Export
      • Generation
        • Models
        • Handlers
        • Resolvers
        • REST
        • Middlewares
      • Logging
      • Microservices
        • Communication
    • RECIPES
      • TypeScript
        • Custom .tslint
      • Basic authentication
      • Setup a local database with your service
      • GraphQL
    • Tutorials
      • Auth0 authentication
      • Metabase integration
      • Database manipulations
        • External database: MongoDB
        • External database: DynamoDB
      • Wrapping an NPM package with GraphQL: a chess server
    • FAQ
  • Command Line Interface
    • Getting started
    • Commands
Powered by GitBook
On this page
  • Overview
  • Which version currently deployed?
  • Create a new service version
  • Publish a new service version
  • Manage service version inside project
  • Move service version per environment
  • Update service version to latest
  • Rollback service version

Was this helpful?

Export as PDF
  1. Getting started
  2. FUNDAMENTALS

Versioning

PreviousProjectsNextAccess and Authorization

Last updated 4 years ago

Was this helpful?

Overview

The bigger your system grows and the more libs or packages you integrate into your project, the more likely you are to face such a problem as dependency hell.

As a solution, code.store platform suggests relying on a simple set of rules and requirements that govern how version numbers are assigned and incremented. There are many approaches to software versioning and their interfaces, the choice is always up to the developer.

code.store platform doesn't enforce any standard on how you need to version your services, but we highly recommend looking at a standard like

's approach can solve most of the versioning issues

When you create a new service, by default, it deployed into private and demo and it's version is 0.0.1

Which version currently deployed?

To find out which version is in use execute cs service:info CLI command and select the service. You will find which versions deployed on private and demo environments.

> cs service:info

              Private                                                         Demo                                                            
version       0.0.2                                                           0.0.1                                                           
deployed      8/5/2020, 10:37:21 PM                                           8/5/2020, 10:38:58 PM                                           
developer key null                                                                                                                            
url           https://api.code.store/a6203d238a744492bf1bf33833c3ebf6/graphql https://api.code.store/a858e12ddd2c47f5b381bef9d98dc7a9/graphql 

On example above on the private environment deployed service with 0.0.2 version and 0.0.1 on the demo.

If you already include service to project, you can execute cs project:service:info CLI command, select project and service to display.

> cs project:service:info

              Development                                                     Staging                                                         Production                                                      
version       0.0.3                                                           0.0.2                                                           0.0.2                                                           
deployed      8/5/2020, 10:39:22 PM                                           8/5/2020, 10:39:23 PM                                           8/5/2020, 10:39:21 PM                                           
developer key                                                                                                                                                                                                 
url           https://api.code.store/8ddc603ea9dd4a669755bf2125bdca24/graphql https://api.code.store/bb2eae903e924bdeb3f6fe9627055d93/graphql https://api.code.store/efe4caaf5584497599728f3785e8fc7d/graphql 

On example above deployed on three environments deployed next versions:

environment

version

development

0.0.3

staging

0.0.2

production

0.0.2

Create a new service version

It's very important to increment service version after making changes to service. Actual service version is always available at package.json file.

Publish a new service version

To make a new version available - execute cs promote CLI command. This command will deploy changes from private to demo environment and makes a new version available for update/include into projects. Promoted version to demo environment is marks as LATEST

cs promote

Manage service version inside project

Move service version per environment

cs project:service:promote

For example, if your project includes some service - you can promote only already deployed service version to another environments.

Update service version to latest

To update project service to latest version execute cs project:service:roll CLI command, where you can select project, environment where will be applied changes, service and version.

Select latest version if you need a latest available service version.

cs project:service:roll

Rollback service version

To rollback service version use the same command cs project:service:roll and just select needed version and environment where to deploy needed version.

To create a new version just push your changes using cs push CLI command. More information about pushing changes can be found in section. After pushing changes - a new version will be available on the private .

By default, code.store platform will automatically increment path (x.y.Z) version of your code after each push, if you follow specification.

After creating a new service version using cs push command - changes will be available only on the private .

demo - is the only place, where developed changes can be published. Changes from demo environment is available for including to the project or public .

When you include a new service to the - version from demo will be deployed. This allows adhering to the concept of public release of new versions to avoid unexpected system behavior. More information about including services to projects can be found in section.

After including service to the project - it's deployed only to development . To move service version to another environment use cs project:service:promote CLI command. It allows you to move already deployed version to another environment.

semver
semver
environment
Services
environment
semver
environment
environment
access
project
environment
Projects
environment