GitHub Action
Jina Hub Image Builder
hub-builder
is a simple interface for building & validating Jina Hub executors. It is built on top of jina hub
interface. It can be used as a Github action in the CICD workflow, or via CLI.
One can use it as a part of CI pipeline, to build and test images in the Pull Request. Simply copy-paste the following YAML file into .github/workflows/hub-builder.yml
.
name: Hub Builder
on: [pull_request]
jobs:
hub-builder:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Jina Hub Image Builder
uses: jina-ai/[email protected]
On every new PR, the builder will find all modified manifest.yml
recursively (deleting is excluded) and try to build an Hub image from it, one by one. That means, when you update an image, you must change manifest.yml
to trigger the build, e.g. you can simply bump version
field in manifest.yml
.
There are two outputs you can use in the post-action:
Name | Description |
---|---|
success_targets |
Successfully built targets with their paths |
failed_targets |
Failed built targets with their paths |
To use the output values, you have to refer to the step by id
, e.g.
jobs:
test_hubbuilder:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Hub builder step
id: hubbuild # later we can refer to this step
uses: ./ # Uses an action in the root directory
continue-on-error: true
- name: Get the output
run: echo "success ${{ steps.hubbuild.outputs.success_targets }} failed ${{ steps.hubbuild.outputs.failed_targets }}"
pip install -r requirements.txt
python app.py --help
python app.py /abc
python app.py /abc --dry-run
Note that dry-run
only checks the name conventions, required files. No actual testing and building.
Simply open the build-TIMESTAMP.json
, there you have a complete overview of this build round and details of each executors.
We welcome all kinds of contributions from the open-source community, individuals and partners. Without your active involvement, Jina won't be successful.
Please first read the contributing guidelines before the submission.
Copyright (c) 2020 Jina AI Limited. All rights reserved.
Jina is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.