An open API service indexing awesome lists of open source software.

https://github.com/kostis-codefresh/humanitec-example

Example for pushing a Docker image from Codefresh to Humanitec
https://github.com/kostis-codefresh/humanitec-example

Last synced: about 1 month ago
JSON representation

Example for pushing a Docker image from Codefresh to Humanitec

Awesome Lists containing this project

README

        

# 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](https://github.com/kostis-codefresh/humanitec-notify-step) and connect the Humanitec Registry as [an external
Registry in Codefresh](https://codefresh.io/docs/docs/integrations/docker-registries/other-registries/)

[![Registry settings](humanitec-registry.png)](humanitec-registry.png)

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](codefresh.yml) for the full pipeline.

[![Codefresh pipeline](humanitec-codefresh.png)](humanitec-codefresh.png)

It does the following:

1. Clones the source code of your app
1. Builds a container image and pushes it to the Humanitec registry
1. 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](https://github.com/kostis-codefresh/humanitec-notify-step)