v1

Getting Started /

Set up a pipeline

Pipelines on Northflank allow you to create and manage complex continuous integration and continuous delivery (CI/CD) workflows.

Essentially, pipelines manage the process of building, deploying and promoting images in different stages.

Together with the configuration options of build and deployment services, pipelines offer an incredible amount of flexibility to support your development process requirements.

Create a pipeline

To create a pipeline:

  1. Choose pipeline from the create new drop-down menu in the top right corner of the dashboard
  2. Enter a name for your pipeline
  3. Click create pipeline
Create a new pipeline

Create a build service

Most aspects of a build service can be configured after creation - including the linked Git repository and branch.

  1. Choose service from the create new drop-down menu in the top right corner of the dashboard
  2. Select build service and enter a name
  3. Select the repository from the drop-down list. You can search for a specific repository, and filter by service or owner. If you're a member of a team and your team administrator has restricted the team to a namespace, you'll need a linked account with access to that namespace.
  4. Enter your pull request and branch build rules, or leave blank to build new commits to pull requests and the main branch. You can enter and select multiple rules, and you can add rules for both pull requests and branches.
  5. Choose your build type: Dockerfile if you have a custom Dockerfile in your registry or Buildpack to automatically build your application
  6. Enter your build context, or leave as default (root)
  7. Dockerfile only: specify the Dockerfile location, or leave as default (root)
  8. Select a compute plan with the appropriate resources for the service
  9. Click create service

Create deployment services

  1. Choose service from the Create new drop-down menu in the top right corner of the dashboard
  2. Select deployment service and enter a name
  3. Select Northflank as the deployment source
  4. (Optional) Add and configure ports
  5. Select a compute plan with the appropriate resources for the service and choose the number of replicas to deploy
  6. Click create service

Add deployment services to your pipeline

To create an effective pipeline you will need to add multiple deployment services.

  1. Select the pipeline you want to use from the project pipelines page
  2. If the pipeline sidebar is not open, click the button on the right of the screen to show it
  3. Click and drag the deployment service from the pipeline sidebar to the stage you want to add it to
Add services to a pipeline

Removing a deployment service from a pipeline will not unlink its build service or external image, nor pause the deployment service. You can edit or disable the deployment service itself from its own dashboard.

Deploy a build to your pipeline

  1. Find the build service you want to deploy from in the pipeline sidebar and click on it to open the build selection menu.
  2. Choose from the list of builds, or find the branch or pull request you wish to deploy a build from, and click the deploy button
  3. Choose the deployment service(s) you want to use in the pipeline and select deploy build. If you do not have any builds for that branch or pull request, you will need to start a new build. To start a new build navigate to the build service, find the branch or pull request to build from, and select a commit to build.
  4. Close the menu when finished or go back to select another build to deploy
  1. Find the build service you want to deploy from in the pipeline sidebar and click on it to open the build selection menu.
  2. Select branches or pull requests
  3. Find the branch or pull request you wish to link and click the link button
  4. Choose the deployment service you want to use in the pipeline and click link branch or link pull request
  5. Close the menu when finished or go back to select another branch or pull request to link

You can manage your pipeline's stages by adding deployment services to different stages.

You can move a deployment service to a different stage by clicking the options button on the deployment service in the pipeline and selecting the move to [stage] option for the stage you want to move it to.

Link stages in a pipeline

Linking Deployment services

To link deployment services navigate to the pipeline you want to edit:

  1. Click the link button on the first deployment service in the chain you want to create (for example if you want to link a service in development to a service in staging, click the button on the service in development)
  2. Your selected deployment service will now be highlighted in green
  3. Click on the deployment service(s) in the next stage you want to link it to
  4. Click again on the link button on the first deployment service you were linking from, or outside the deployment cards, to exit the link editor for that service

Please note:

  • You must have at least two deployment services added to different, but adjacent, stages.
  • Links can only be made between service in adjacent stages.
  • Moving a deployment service to another stage will break its current links.

Unlinking Deployment services

To unlink deployment services navigate to the pipeline you want to edit:

  1. Click the link button on the first deployment service in the chain you want to unlink (for example if you have a service in staging linked to a service in production, click the button on the service in staging)
  2. Your selected deployment service will now be highlighted in green
  3. Click the unlink button on the deployment service(s) you want to unlink
  4. Click again on the link button on the first deployment service you were linking from, or outside the deployment cards, to exit the link editor for that service

You can remove all links from deployment service by clicking the options button on the deployment service in the pipeline and selecting unlink all.

Promote builds

You can promote a build from a deployment service in one stage to a linked deployment service in a subsequent stage by clicking the promote button on the previous service in the link.

This will replace the currently deployed build on the linked deployment service.

Promote builds in a pipeline

© 2022 Northflank Ltd. All rights reserved.