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
- Host: GitHub
- URL: https://github.com/kostis-codefresh/humanitec-example
- Owner: kostis-codefresh
- Created: 2021-02-22T14:56:45.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-03T12:03:33.000Z (about 4 years ago)
- Last Synced: 2025-02-09T00:35:54.760Z (3 months ago)
- Language: Go
- Homepage: https://codefresh.io
- Size: 117 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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/)[](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.
[](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 buildThe 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)