ubuild is our release tool. It allows you to:
Generate a release
Compile programs
Build containers
Push those containers to a remote registry
Everything in one command.
go get github.com/upfluence/ubuild
Before running ubuild you must export a GITHUB_TOKEN and set RELEASE to true into your environment and be logged in into a docker hub account with access to upfluence image registry.
type: <lang> go, rb, py, frontend
verbose: <true/false>
repository: <github_path>
# needed only for compiled language
compiler:
binaries:
- path: <path_to_entrypp>
dist:
CGO:
args: # map of arguments to pass to the compiler
key: val
...
docker:
dockerfile: <path_to_dockerfile> # Dockerfile by default
image: <image_name>
tags: # additional tags
key: val
...
deployer:
url:
envs:
key: val
...
For example this configuration will build an image based on a python package, update the release of upfluence/ner_analyser and update to the docker image named "ner-analyser".
type: py
verbose: true
repository: <org>/<repository>
docker:
image: "<image_name>"
To use ubuild with circle-ci you must use the golang primary image have run go get in a step of you job. The sensitive environment variable should be fetched from the project settings.
Example: - run: docker images
publish:
docker:
- image: circleci/golang:1.13
environment:
RELEASE: true
steps:
- checkout
- setup_remote_docker
- run:
command: |
docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: go get github.com/upfluence/ubuild/cmd/ubuild
- run:
name: Building server image
command: ubuild