kostis-codefresh / humanitec-example

Example for pushing a Docker image from Codefresh to Humanitec

Home Page:https://codefresh.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Codefresh - Humanitec integration

This is an example for pushing a container image from Codefresh to Humanitec and notifying Humanitec for the new build

Step 1 - Connect the Humanitec Registry to Codefresh

Follow the instructions for getting the registry credentials and connect the Humanitec Registry as an external Registry in Codefresh

Registry settings

You can optionally fill in the Repository prefix field with your Humanitec Organization so that you don't have to remember to include it in your push steps.

Step 2 - Create a Codefresh pipeline that builds/pushes an image

See file codefresh.yml for the full pipeline.

Codefresh pipeline

It does the following:

  1. Clones the source code of your app
  2. Builds a container image and pushes it to the Humanitec registry
  3. Notifies Humanitec for the new build

The pipeline expects the following parameters:

  • IMAGE_NAME - your docker image name (user defined)
  • HUMANITEC_ORG - You Humanitec organization (created during sign-up)
  • HUMANITEC_TOKEN - Your Humanitec token (get it from Humanitec UI)

The notification source code is at https://github.com/kostis-codefresh/humanitec-notify-step

About

Example for pushing a Docker image from Codefresh to Humanitec

https://codefresh.io


Languages

Language:Go 64.3%Language:Dockerfile 35.7%