Skip to content

Overview

When you specify to build manually, Nullstone will not attempt to build the application. Instead, you are responsible for building the application code.

Once you have built an artifact, you can use the Nullstone CLI to automate push and deployment.

Push

The <artifact-name> refers to the docker image, zip file, or publish directory.

shell
nullstone push --source=<artifact-name> --stack=<stack-name> --app=<app-name> --env=<env-name>

If you don't specify a version, Nullstone will attempt to use the short commit sha detected from the Git repository in the current directory. Alternatively, you can specify a version using the --version flag.

shell
nullstone push --source=<artifact-name> --stack=<stack-name> --app=<app-name> --env=<env-name> --version=<version>

Deploy

shell
nullstone deploy --source=<artifact-name> --stack=<stack-name> --app=<app-name> --env=<env-name>

As with the push command, if you don't specify a version, Nullstone will attempt to use the short commit sha detected from the Git repository in the current directory. Alternatively, you can specify a version using the --version flag.

shell
nullstone deploy --stack=<stack-name> --app=<app-name> --env=<env-name> --version=<version>

Integrations

Nullstone offers a set of integrations for popular CI/CD platforms.

GitHub Actions

The Nullstone GitHub Action installs the latest Nullstone CLI that you can use to run push, deploy, and other commands.

TIP

This integration guides you through initiating Nullstone deployments from GitHub Actions. If you want Nullstone to initiate a GitHub Actions build workflow instead, see GitHub Actions builder.

Make sure to:

  • Set the NULLSTONE_ORG environment variable
  • Add NULLSTONE_API_KEY as a repository secret
yaml
env:
  NULLSTONE_ORG: nullstone
  NULLSTONE_API_KEY: ${{ secrets.NULLSTONE_API_KEY }}

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      ... other steps
      - name: Set up Nullstone
        uses: nullstone-io/setup-nullstone-action@v0
      - run:
          nullstone push --source=<artifact-name> --stack=<stack-name> --app=<app-name> --env=<env-name>

CircleCI

The Nullstone CircleCI orb provides steps to push and deploy to Nullstone.

Make sure to create a CircleCI context named nullstone with:

  • NULLSTONE_ORG set to the name of your Nullstone organization
  • NULLSTONE_API_KEY set to your Nullstone API key
yaml
# .circleci/config.yml
orbs:
  nullstone: nullstone/nullstone@1

workflows:
  dev:
    jobs:
      - build
      - deploy:
          env: dev
          context:
            - nullstone

jobs:
  build:
    # .. Build docker image here
  deploy:
    environment:
      NULLSTONE_APP: <app>
    parameters:
      env:
        description: "Deployment target env"
        type: string
    steps:
      - checkout
      - nullstone/install
      - nullstone/push:
          source: <docker image built above>
          env: << parameters.env >>
      - nullstone/deploy:
          env: << parameters.env >>