CircleCI
Orb Quick Start Guide
The Altostra Orb is used to simplify the integration of Altostra into your CircleCI pipeline, and to help you streamline your CI/CD process.
- Use CircleCI version 2.1 at the top of your .circleci/config.yml file.
version: 2.1
- Add the orbs step below your version to include the orb:
orbs:
altostra-orb: altostra/altostra-orb@x.y
- In order to use the Altostra Orb, you will need to set your Altostra API token in the
ALTO_API_KEY
environment variable of the project.
Commands
The orb contains these commands:
setup
altostra-orb/setup
- Installs the latest Altostra CLI and sets up your API token from the ALTO_API_KEY
environment variable
push
Push a new image of the current project
PARAMETER | DESCRIPTION | REQUIRED | DEFAULT | TYPE |
---|---|---|---|---|
image-name | The image name (i.e: 1.0.0, v2.4.1, alpha, dev, test, ...) | [x] | - | string |
deploy-version
Deploy the current project from an existing image
PARAMETER | DESCRIPTION | REQUIRED | DEFAULT | TYPE |
---|---|---|---|---|
image-name | The image name (i.e: 1.0.0, v2.4.1, alpha, dev, test, ...) | [x] | - | string |
instance-name | The instance name to deploy | [x] | - | string |
env-name | The environment to which to deploy | [x] | - | string |
deploy
Push and deploy the current project
PARAMETER | DESCRIPTION | REQUIRED | DEFAULT | TYPE |
---|---|---|---|---|
image-name | The image name (i.e: 1.0.0, v2.4.1, alpha, dev, test, ...) | '' | string | |
instance-name | The instance name to deploy | [x] | - | string |
env-name | The environment to which to deploy | [x] | - | string |
Usage Examples
Deploying a basic node project using orb commands
version: 2.1
orbs:
altostra-orb: altostra/altostra-orb@x.y
jobs:
build-and-push:
docker:
- image: cimg/node:12.19
working_directory: ~/repo
steps:
- checkout
- altostra-orb/setup #Make sure you have the Environment Variable "ALTO_API_KEY" set in your project
- install:
name: Install node modules
command: |
npm install
- altostra-orb/deploy:
instance-name: "MyInstance"
env-name: "Development"
workflows:
alto-deploy:
jobs:
- build-and-push
Jobs
The orb contains these jobs:
deploy-node-project
PARAMETER | DESCRIPTION | REQUIRED | DEFAULT | TYPE |
---|---|---|---|---|
image-name | The image name (i.e: 1.0.0, v2.4.1, alpha, dev, test, ...) | '' | string | |
instance-name | The instance name to deploy | [x] | - | string |
env-name | The environment to which to deploy | [x] | - | string |
node-version | Pick a specific circleci/node image variant: https://hub.docker.com/r/cimg/node/tags | [] | '12.19' | string |
Usage Examples
deploy-node-project
job
Using the version: 2.1
orbs:
altostra-orb: altostra/altostra-orb@x.y
workflows:
use-altostra-job:
jobs:
- altostra-orb/deploy-node-project:
node-version: '12.17'
instance-name: "test-job"
env-name: "Daylong"